Record Class ItemTransform

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

public record ItemTransform(Vector3fc rotation, Vector3fc translation, Vector3fc scale, Vector3fc rightRotation) extends Record
  • Field Details

    • rotation

      private final Vector3fc rotation
      The field for the rotation record component.
    • translation

      private final Vector3fc translation
      The field for the translation record component.
    • scale

      private final Vector3fc scale
      The field for the scale record component.
    • rightRotation

      private final Vector3fc rightRotation
      The field for the rightRotation record component.
    • NO_TRANSFORM

      public static final ItemTransform NO_TRANSFORM
  • Constructor Details

    • ItemTransform

      public ItemTransform(Vector3fc rotation, Vector3fc translation, Vector3fc scale)
    • ItemTransform

      public ItemTransform(Vector3fc rotation, Vector3fc translation, Vector3fc scale, Vector3fc rightRotation)
      Creates an instance of a ItemTransform record class.
      Parameters:
      rotation - the value for the rotation record component
      translation - the value for the translation record component
      scale - the value for the scale record component
      rightRotation - the value for the rightRotation record component
  • Method Details

    • apply

      public void apply(boolean pLeftHand, PoseStack.Pose pPose)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • rotation

      public Vector3fc rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • translation

      public Vector3fc translation()
      Returns the value of the translation record component.
      Returns:
      the value of the translation record component
    • scale

      public Vector3fc scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • rightRotation

      public Vector3fc rightRotation()
      Returns the value of the rightRotation record component.
      Returns:
      the value of the rightRotation record component