Interface IIngredientComponentHandler<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.

public interface IIngredientComponentHandler<VT extends IValueType<V>,V extends IValue,T,M>
Handles the translation between IngredientComponent instances and IValue.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M>
     
     
    default 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.
    toValue(T instance)
    Convert an instance to a value.
  • Method Details

    • getValueType

      VT getValueType()
      Returns:
      The value type with which the component should be handled.
    • getComponent

      org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> getComponent()
      Returns:
      The recipe component.
    • toValue

      V toValue(@Nullable T instance)
      Convert an instance to a value.
      Parameters:
      instance - A recipe component instance.
      Returns:
      A value.
    • toInstance

      @Nullable T toInstance(V value)
      Convert a value to an instance.
      Parameters:
      value - A value.
      Returns:
      A recipe component instance.
    • toCompactString

      default net.minecraft.network.chat.Component toCompactString(V ingredientValue)
      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.