Record Class BlockElement

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BlockElement

public record BlockElement(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction,BlockElementFace> faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission, ExtraFaceData faceData) extends Record
  • Field Details

    • from

      private final org.joml.Vector3fc from
      The field for the from record component.
    • to

      private final org.joml.Vector3fc to
      The field for the to record component.
    • faces

      private final Map<Direction,BlockElementFace> faces
      The field for the faces record component.
    • rotation

      @Nullable private final BlockElementRotation rotation
      The field for the rotation record component.
    • shade

      private final boolean shade
      The field for the shade record component.
    • lightEmission

      private final int lightEmission
      The field for the lightEmission record component.
    • faceData

      private final ExtraFaceData faceData
      The field for the faceData record component.
    • DEFAULT_RESCALE

      private static final boolean DEFAULT_RESCALE
      See Also:
    • MIN_EXTENT

      private static final float MIN_EXTENT
      See Also:
    • MAX_EXTENT

      private static final float MAX_EXTENT
      See Also:
  • Constructor Details

    • BlockElement

      public BlockElement(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction,BlockElementFace> faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission, ExtraFaceData faceData)
      Creates an instance of a BlockElement record class.
      Parameters:
      from - the value for the from record component
      to - the value for the to record component
      faces - the value for the faces record component
      rotation - the value for the rotation record component
      shade - the value for the shade record component
      lightEmission - the value for the lightEmission record component
      faceData - the value for the faceData record component
    • BlockElement

      public BlockElement(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction,BlockElementFace> faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission)
    • BlockElement

      public BlockElement(org.joml.Vector3fc p_405527_, org.joml.Vector3fc p_405454_, Map<Direction,BlockElementFace> p_362722_)
  • Method Details

    • 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 '=='.
      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.
    • from

      public org.joml.Vector3fc from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public org.joml.Vector3fc to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component
    • faces

      public Map<Direction,BlockElementFace> faces()
      Returns the value of the faces record component.
      Returns:
      the value of the faces record component
    • rotation

      @Nullable public BlockElementRotation rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • shade

      public boolean shade()
      Returns the value of the shade record component.
      Returns:
      the value of the shade record component
    • lightEmission

      public int lightEmission()
      Returns the value of the lightEmission record component.
      Returns:
      the value of the lightEmission record component
    • faceData

      public ExtraFaceData faceData()
      Returns the value of the faceData record component.
      Returns:
      the value of the faceData record component