Record Class AnimationTarget
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.entity.animation.AnimationTarget
- Record Components:
channelTarget- The associatedAnimationChannel.Target.keyframeTarget- AnAnimationKeyframeTargetthat transforms simple vectors into ones that make sense for thechannelTarget.inverseKeyframeTarget- The inverse function ofkeyframeTarget, used for serialization.
public record AnimationTarget(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 Summary
FieldsModifier and TypeFieldDescriptionprivate final AnimationChannel.TargetThe field for thechannelTargetrecord component.private final AnimationKeyframeTargetThe field for theinverseKeyframeTargetrecord component.private final AnimationKeyframeTargetThe field for thekeyframeTargetrecord component.static final AnimationTargetstatic final AnimationTargetstatic final AnimationTarget -
Constructor Summary
ConstructorsConstructorDescriptionAnimationTarget(AnimationChannel.Target channelTarget, AnimationKeyframeTarget keyframeTarget, AnimationKeyframeTarget inverseKeyframeTarget) Creates an instance of aAnimationTargetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechannelTargetrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.private static Vector3finverseDegreeVec(float x, float y, float z) Returns the value of theinverseKeyframeTargetrecord component.private static Vector3finverseScaleVec(double x, double y, double z) Returns the value of thekeyframeTargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
channelTarget
The field for thechannelTargetrecord component. -
keyframeTarget
The field for thekeyframeTargetrecord component. -
inverseKeyframeTarget
The field for theinverseKeyframeTargetrecord component. -
POSITION
-
ROTATION
-
SCALE
-
-
Constructor Details
-
AnimationTarget
public AnimationTarget(AnimationChannel.Target channelTarget, AnimationKeyframeTarget keyframeTarget, AnimationKeyframeTarget inverseKeyframeTarget) Creates an instance of aAnimationTargetrecord class.- Parameters:
channelTarget- the value for thechannelTargetrecord componentkeyframeTarget- the value for thekeyframeTargetrecord componentinverseKeyframeTarget- the value for theinverseKeyframeTargetrecord component
-
-
Method Details
-
inverseDegreeVec
-
inverseScaleVec
-
equals
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 withObjects::equals(Object,Object). -
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. -
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. -
channelTarget
Returns the value of thechannelTargetrecord component.- Returns:
- the value of the
channelTargetrecord component
-
keyframeTarget
Returns the value of thekeyframeTargetrecord component.- Returns:
- the value of the
keyframeTargetrecord component
-
inverseKeyframeTarget
Returns the value of theinverseKeyframeTargetrecord component.- Returns:
- the value of the
inverseKeyframeTargetrecord component
-