Class SimpleRecipeComponent<T>

java.lang.Object
dev.latvian.mods.kubejs.recipe.component.SimpleRecipeComponent<T>
All Implemented Interfaces:
RecipeComponent<T>
Direct Known Subclasses:
CharacterComponent

public class SimpleRecipeComponent<T> extends Object implements RecipeComponent<T>
  • Field Details

    • type

      public final RecipeComponentType<?> type
    • codec

      public final com.mojang.serialization.Codec<T> codec
    • typeInfo

      public final dev.latvian.mods.rhino.type.TypeInfo typeInfo
  • Constructor Details

    • SimpleRecipeComponent

      public SimpleRecipeComponent(RecipeComponentType<?> type, com.mojang.serialization.Codec<T> codec, dev.latvian.mods.rhino.type.TypeInfo typeInfo)
  • Method Details

    • type

      public RecipeComponentType<?> type()
      Specified by:
      type in interface RecipeComponent<T>
    • codec

      public com.mojang.serialization.Codec<T> codec()
      Specified by:
      codec in interface RecipeComponent<T>
    • typeInfo

      public dev.latvian.mods.rhino.type.TypeInfo typeInfo()
      Description copied from interface: RecipeComponent
      Defines a description for how this component may be constructed. Type descriptions may be comprised of a primitive type such as a string, number or Java class (which may be useful if that that class has an appropriate type wrapper for it already), an array of fixed or dynamic length, a map / object, or a union of multiple types.

      Type descriptions are used by addons like ProbeJS to provide typing hints.

      Specified by:
      typeInfo in interface RecipeComponent<T>
      Returns:
      A description of how this component may be constructed
    • toString

      public String toString()
      Overrides:
      toString in class Object