Record Class AnimationTarget
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.entity.animation.AnimationTarget
- Record Components:
channelTarget
- The associatedAnimationChannel.Target
.keyframeTarget
- AnAnimationKeyframeTarget
that transforms simple vectors into ones that make sense for thechannelTarget
.inverseKeyframeTarget
- The inverse function ofkeyframeTarget
, 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 Summary
FieldsModifier and TypeFieldDescriptionprivate final net.minecraft.client.animation.AnimationChannel.Target
The field for thechannelTarget
record component.private final AnimationKeyframeTarget
The field for theinverseKeyframeTarget
record component.private final AnimationKeyframeTarget
The field for thekeyframeTarget
record component.static final AnimationTarget
static final AnimationTarget
static final AnimationTarget
-
Constructor Summary
ConstructorsConstructorDescriptionAnimationTarget
(net.minecraft.client.animation.AnimationChannel.Target channelTarget, AnimationKeyframeTarget keyframeTarget, AnimationKeyframeTarget inverseKeyframeTarget) Creates an instance of aAnimationTarget
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.animation.AnimationChannel.Target
Returns the value of thechannelTarget
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.private static org.joml.Vector3f
inverseDegreeVec
(float x, float y, float z) Returns the value of theinverseKeyframeTarget
record component.private static org.joml.Vector3f
inverseScaleVec
(double x, double y, double z) Returns the value of thekeyframeTarget
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
channelTarget
private final net.minecraft.client.animation.AnimationChannel.Target channelTargetThe field for thechannelTarget
record component. -
keyframeTarget
The field for thekeyframeTarget
record component. -
inverseKeyframeTarget
The field for theinverseKeyframeTarget
record component. -
POSITION
-
ROTATION
-
SCALE
-
-
Constructor Details
-
AnimationTarget
public AnimationTarget(net.minecraft.client.animation.AnimationChannel.Target channelTarget, AnimationKeyframeTarget keyframeTarget, AnimationKeyframeTarget inverseKeyframeTarget) Creates an instance of aAnimationTarget
record class.- Parameters:
channelTarget
- the value for thechannelTarget
record componentkeyframeTarget
- the value for thekeyframeTarget
record componentinverseKeyframeTarget
- the value for theinverseKeyframeTarget
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
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
public net.minecraft.client.animation.AnimationChannel.Target channelTarget()Returns the value of thechannelTarget
record component.- Returns:
- the value of the
channelTarget
record component
-
keyframeTarget
Returns the value of thekeyframeTarget
record component.- Returns:
- the value of the
keyframeTarget
record component
-
inverseKeyframeTarget
Returns the value of theinverseKeyframeTarget
record component.- Returns:
- the value of the
inverseKeyframeTarget
record component
-