Interface IIngredientComponentValueHandler<VT extends IValueType<V>,V extends IValue,T,M>
- Type Parameters:
VT
- The value type.V
- The value.T
- The instance type.M
- The matching condition parameter.
- All Known Implementing Classes:
IngredientComponentValueHandlerEnergy
,IngredientComponentValueHandlerFluidStack
,IngredientComponentValueHandlerItemStack
public interface IIngredientComponentValueHandler<VT extends IValueType<V>,V extends IValue,T,M>
Handles the translation between
IngredientComponent
instances and IValue
.-
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.network.chat.Component
toCompactString
(V ingredientValue) Convert the given list of values to a compact string.toInstance
(V value) Convert a value to an instance.Convert an instance to a value.
-
Method Details
-
getValueType
VT getValueType()- Returns:
- The value type with which the component should be handled.
-
getComponent
- Returns:
- The recipe component.
-
toValue
Convert an instance to a value.- Parameters:
instance
- A recipe component instance.- Returns:
- A value.
-
toInstance
Convert a value to an instance.- Parameters:
value
- A value.- Returns:
- A recipe component instance.
-
toCompactString
Convert the given list of values to a compact string. To be used in things like tooltips.- Parameters:
ingredientValue
- A list of ingredient values.- Returns:
- A compact string representation.
-