Class IngredientComponentCapabilityAttacherManager
java.lang.Object
org.cyclops.commoncapabilities.api.ingredient.capability.IngredientComponentCapabilityAttacherManager
A helper manager that can be used to easily attach capabilities to ingredient components.
This manager must be instantiated during mod initialization,
and instances of
IIngredientComponentCapabilityAttacher
can be registered to it.
When the ingredient components are being registered later on,
this manager will ensure that the registered attachers are called,
and that their capabilities are attached.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttacher
(IIngredientComponentCapabilityAttacher<?, ?> attacher) Register the given capability attacher.protected <T,
M> void onIngredientComponentLoad
(AttachCapabilitiesEventIngredientComponent event, IngredientComponent<T, M> ingredientComponent) void
-
Constructor Details
-
IngredientComponentCapabilityAttacherManager
public IngredientComponentCapabilityAttacherManager()
-
-
Method Details
-
addAttacher
Register the given capability attacher.- Parameters:
attacher
- A capability attacher that will be called when the corresponding capability is instantiated.
-
onIngredientComponentsLoad
-
onIngredientComponentLoad
protected <T,M> void onIngredientComponentLoad(AttachCapabilitiesEventIngredientComponent event, IngredientComponent<T, M> ingredientComponent)
-