Record Class ItemModelGenerator.ItemLayerKey

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.ItemModelGenerator.ItemLayerKey
All Implemented Interfaces:
ModelBaker.SharedOperationKey<QuadCollection>
Enclosing class:
ItemModelGenerator

public static record ItemModelGenerator.ItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex) extends Record implements ModelBaker.SharedOperationKey<QuadCollection>
  • Field Details

    • material

      private final Material.Baked material
      The field for the material record component.
    • modelState

      private final ModelState modelState
      The field for the modelState record component.
    • layerIndex

      private final int layerIndex
      The field for the layerIndex record component.
  • Constructor Details

    • ItemLayerKey

      public ItemLayerKey(Material.Baked material, ModelState modelState, int layerIndex)
      Creates an instance of a ItemLayerKey record class.
      Parameters:
      material - the value for the material record component
      modelState - the value for the modelState record component
      layerIndex - the value for the layerIndex record component
  • Method Details

    • compute

      public QuadCollection compute(ModelBaker modelBakery)
      Specified by:
      compute in interface ModelBaker.SharedOperationKey<QuadCollection>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • material

      public Material.Baked material()
      Returns the value of the material record component.
      Returns:
      the value of the material record component
    • modelState

      public ModelState modelState()
      Returns the value of the modelState record component.
      Returns:
      the value of the modelState record component
    • layerIndex

      public int layerIndex()
      Returns the value of the layerIndex record component.
      Returns:
      the value of the layerIndex record component