Interface IIngredientComponentHandlerRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
- All Known Implementing Classes:
IngredientComponentHandlerRegistry
public interface IIngredientComponentHandlerRegistry
extends org.cyclops.cyclopscore.init.IRegistry
Registry for handling the translation between
IngredientComponent
instances and IValue
.-
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
-
register
<VT extends IValueType<V>,V extends IValue, H registerT, M, H extends IIngredientComponentHandler<VT, V, T, M>> (H handler) Register a new recipe component handler.- 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 <VT extends IValueType<V>,V extends IValue, IIngredientComponentHandler<VT,T, M> V, getComponentHandlerT, M> (org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> component) Get a handler by component type.- 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
Set<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?,?>> getComponents()- Returns:
- The recipe components that have a handler.
-