Class IngredientComponentHandlerRegistry
java.lang.Object
org.cyclops.integrateddynamics.core.ingredient.IngredientComponentHandlerRegistry
- All Implemented Interfaces:
org.cyclops.cyclopscore.init.IRegistry,IIngredientComponentHandlerRegistry
public class IngredientComponentHandlerRegistry
extends Object
implements IIngredientComponentHandlerRegistry
-
Method Summary
Modifier and TypeMethodDescription<VT extends IValueType<V>,V extends IValue, T, M>
IIngredientComponentHandler<VT, V, T, M> getComponentHandler(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> component) Get a handler by component type.Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>> <VT extends IValueType<V>,V extends IValue, T, M, H extends IIngredientComponentHandler<VT, V, T, M>>
Hregister(H handler) Register a new recipe component handler.
-
Method Details
-
getInstance
- Returns:
- The unique instance.
-
register
public <VT extends IValueType<V>,V extends IValue, H registerT, M, H extends IIngredientComponentHandler<VT, V, T, M>> (H handler) Description copied from interface:IIngredientComponentHandlerRegistryRegister a new recipe component handler.- Specified by:
registerin interfaceIIngredientComponentHandlerRegistry- Type Parameters:
VT- The value type.V- The value.T- The instance type.M- The matching condition parameter.H- The handler type.- Parameters:
handler- The new handler.- Returns:
- The registered handler.
-
getComponentHandler
@Nullable public <VT extends IValueType<V>,V extends IValue, IIngredientComponentHandler<VT,T, M> V, getComponentHandlerT, M> (org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> component) Description copied from interface:IIngredientComponentHandlerRegistryGet a handler by component type.- Specified by:
getComponentHandlerin interfaceIIngredientComponentHandlerRegistry- Type Parameters:
VT- The value type.V- The value.T- The instance type.M- The matching condition parameter.- Parameters:
component- The component type.- Returns:
- The handler or null.
-
getComponents
- Specified by:
getComponentsin interfaceIIngredientComponentHandlerRegistry- Returns:
- The recipe components that have a handler.
-