Enum Class IgnoreComponent

java.lang.Object
java.lang.Enum<IgnoreComponent>
dev.latvian.mods.kubejs.recipe.component.IgnoreComponent
All Implemented Interfaces:
RecipeComponent<Object>, Serializable, Comparable<IgnoreComponent>, Constable

public enum IgnoreComponent extends Enum<IgnoreComponent> implements RecipeComponent<Object>
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static IgnoreComponent[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IgnoreComponent valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • type

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

      public com.mojang.serialization.Codec<Object> codec()
      Specified by:
      codec in interface RecipeComponent<Object>
    • 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<Object>
      Returns:
      A description of how this component may be constructed
    • wrap

      public Object wrap(RecipeScriptContext cx, Object from)
      Description copied from interface: RecipeComponent
      Method to read the value contained within this component from an input object; this may be some arbitrary value passed into a schema's constructor(s) or automatically generated builder methods. By default, it will attempt to type wrap based on RecipeComponent.typeInfo()
      Specified by:
      wrap in interface RecipeComponent<Object>
      Parameters:
      cx - Script context
      from - An object to be converted to a value for this component
      Returns:
      The value read from the input
    • validate

      public void validate(RecipeValidationContext ctx, Object value)
      Specified by:
      validate in interface RecipeComponent<Object>
    • allowEmpty

      public boolean allowEmpty()
      Specified by:
      allowEmpty in interface RecipeComponent<Object>
    • isEmpty

      public boolean isEmpty(Object value)
      Description copied from interface: RecipeComponent
      Shallow empty check function
      Specified by:
      isEmpty in interface RecipeComponent<Object>
    • toString

      public String toString()
      Overrides:
      toString in class Enum<IgnoreComponent>
    • buildUniqueId

      public void buildUniqueId(UniqueIdBuilder builder, Object value)
      Specified by:
      buildUniqueId in interface RecipeComponent<Object>
    • isIgnored

      public boolean isIgnored()
      Specified by:
      isIgnored in interface RecipeComponent<Object>