Record Class HeadProperties

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.pokemon.species.palette.head.HeadProperties
Record Components:
headBoneNames - The set of head bone names (expected to be lower-case).
minimumYaw - The minimum yaw angle (in degrees).
maximumYaw - The maximum yaw angle (in degrees).
minimumPitch - The minimum pitch angle (in degrees).
maximumPitch - The maximum pitch angle (in degrees).

public record HeadProperties(Set<String> headBoneNames, float minimumYaw, float maximumYaw, float minimumPitch, float maximumPitch) extends Record
The definition for head movement properties for a palette.
If a palette does not have this defined, the head will not move.
The head bone names here are case insensitive and takes both single string and list of strings.
  • Field Details

    • HEAD_BONE_NAME_CODEC

      public static final com.mojang.serialization.Codec<List<String>> HEAD_BONE_NAME_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<HeadProperties> CODEC
  • Constructor Details

    • HeadProperties

      public HeadProperties(List<String> headBoneNames, float minimumYaw, float maximumYaw, float minimumPitch, float maximumPitch)
    • HeadProperties

      public HeadProperties(Set<String> headBoneNames, float minimumYaw, float maximumYaw, float minimumPitch, float maximumPitch)
      Creates an instance of a HeadProperties record class.
      Parameters:
      headBoneNames - the value for the headBoneNames record component
      minimumYaw - the value for the minimumYaw record component
      maximumYaw - the value for the maximumYaw record component
      minimumPitch - the value for the minimumPitch record component
      maximumPitch - the value for the maximumPitch record component
  • 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.
    • headBoneNames

      public Set<String> headBoneNames()
      Returns the value of the headBoneNames record component.
      Returns:
      the value of the headBoneNames record component
    • minimumYaw

      public float minimumYaw()
      Returns the value of the minimumYaw record component.
      Returns:
      the value of the minimumYaw record component
    • maximumYaw

      public float maximumYaw()
      Returns the value of the maximumYaw record component.
      Returns:
      the value of the maximumYaw record component
    • minimumPitch

      public float minimumPitch()
      Returns the value of the minimumPitch record component.
      Returns:
      the value of the minimumPitch record component
    • maximumPitch

      public float maximumPitch()
      Returns the value of the maximumPitch record component.
      Returns:
      the value of the maximumPitch record component