Record Class AnimationMetadataSection

java.lang.Object
java.lang.Record
net.minecraft.client.resources.metadata.animation.AnimationMetadataSection

public record AnimationMetadataSection(Optional<List<AnimationFrame>> frames, Optional<Integer> frameWidth, Optional<Integer> frameHeight, int defaultFrameTime, boolean interpolatedFrames) extends Record
  • Field Details

    • frames

      private final Optional<List<AnimationFrame>> frames
      The field for the frames record component.
    • frameWidth

      private final Optional<Integer> frameWidth
      The field for the frameWidth record component.
    • frameHeight

      private final Optional<Integer> frameHeight
      The field for the frameHeight record component.
    • defaultFrameTime

      private final int defaultFrameTime
      The field for the defaultFrameTime record component.
    • interpolatedFrames

      private final boolean interpolatedFrames
      The field for the interpolatedFrames record component.
    • CODEC

      public static final com.mojang.serialization.Codec<AnimationMetadataSection> CODEC
    • TYPE

      public static final MetadataSectionType<AnimationMetadataSection> TYPE
  • Constructor Details

    • AnimationMetadataSection

      public AnimationMetadataSection(Optional<List<AnimationFrame>> frames, Optional<Integer> frameWidth, Optional<Integer> frameHeight, int defaultFrameTime, boolean interpolatedFrames)
      Creates an instance of a AnimationMetadataSection record class.
      Parameters:
      frames - the value for the frames record component
      frameWidth - the value for the frameWidth record component
      frameHeight - the value for the frameHeight record component
      defaultFrameTime - the value for the defaultFrameTime record component
      interpolatedFrames - the value for the interpolatedFrames record component
  • Method Details

    • calculateFrameSize

      public FrameSize calculateFrameSize(int p_249859_, int p_250148_)
    • 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.
    • frames

      public Optional<List<AnimationFrame>> frames()
      Returns the value of the frames record component.
      Returns:
      the value of the frames record component
    • frameWidth

      public Optional<Integer> frameWidth()
      Returns the value of the frameWidth record component.
      Returns:
      the value of the frameWidth record component
    • frameHeight

      public Optional<Integer> frameHeight()
      Returns the value of the frameHeight record component.
      Returns:
      the value of the frameHeight record component
    • defaultFrameTime

      public int defaultFrameTime()
      Returns the value of the defaultFrameTime record component.
      Returns:
      the value of the defaultFrameTime record component
    • interpolatedFrames

      public boolean interpolatedFrames()
      Returns the value of the interpolatedFrames record component.
      Returns:
      the value of the interpolatedFrames record component