Record Class AnimationTarget

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.entity.animation.AnimationTarget
Record Components:
channelTarget - The associated AnimationChannel.Target.
keyframeTarget - An AnimationKeyframeTarget that transforms simple vectors into ones that make sense for the channelTarget.
inverseKeyframeTarget - The inverse function of keyframeTarget, used for serialization.

public record AnimationTarget(net.minecraft.client.animation.AnimationChannel.Target channelTarget, AnimationKeyframeTarget keyframeTarget, AnimationKeyframeTarget inverseKeyframeTarget) extends Record
Wrapper for a AnimationChannel.Target and a way to transform a simple keyframe vector into a vector that makes sense for the given target.
  • Field Details

  • Constructor Details

    • AnimationTarget

      public AnimationTarget(net.minecraft.client.animation.AnimationChannel.Target channelTarget, AnimationKeyframeTarget keyframeTarget, AnimationKeyframeTarget inverseKeyframeTarget)
      Creates an instance of a AnimationTarget record class.
      Parameters:
      channelTarget - the value for the channelTarget record component
      keyframeTarget - the value for the keyframeTarget record component
      inverseKeyframeTarget - the value for the inverseKeyframeTarget record component
  • Method Details

    • inverseDegreeVec

      private static org.joml.Vector3f inverseDegreeVec(float x, float y, float z)
    • inverseScaleVec

      private static org.joml.Vector3f inverseScaleVec(double x, double y, double z)
    • equals

      public boolean equals(Object obj)
      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:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • hashCode

      public 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
    • 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
    • channelTarget

      public net.minecraft.client.animation.AnimationChannel.Target channelTarget()
      Returns the value of the channelTarget record component.
      Returns:
      the value of the channelTarget record component
    • keyframeTarget

      public AnimationKeyframeTarget keyframeTarget()
      Returns the value of the keyframeTarget record component.
      Returns:
      the value of the keyframeTarget record component
    • inverseKeyframeTarget

      public AnimationKeyframeTarget inverseKeyframeTarget()
      Returns the value of the inverseKeyframeTarget record component.
      Returns:
      the value of the inverseKeyframeTarget record component