Class AnimationParser
java.lang.Object
net.neoforged.neoforge.client.entity.animation.json.AnimationParser
A parser for parsing JSON-based entity animation files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<net.minecraft.client.animation.AnimationChannel> { "keyframes": [ { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" } ], "target": "minecraft:rotation" }
static final com.mojang.serialization.Codec
<net.minecraft.client.animation.AnimationDefinition> { "length": 1.125, "loop": true, "animations": [ { "bone": "head", "keyframes": [ { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" } ] } ] }
private static final com.mojang.serialization.Codec
<net.minecraft.client.animation.AnimationChannel.Interpolation> invalid @snippet
{@snippet lang = JSON :
private static final com.mojang.serialization.Codec
<it.unimi.dsi.fastutil.Pair<String, net.minecraft.client.animation.AnimationChannel>> { "bone": "head", "keyframes": [ { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" } ], "target": "minecraft:rotation" }
private static final com.mojang.serialization.Codec
<AnimationTarget> invalid @snippet
{@snippet lang = JSON :
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static com.mojang.serialization.Codec
<net.minecraft.client.animation.Keyframe> keyframeCodec
(AnimationTarget target) { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" }
private static UnaryOperator
<org.joml.Vector3f>
-
Field Details
-
TARGET_CODEC
invalid @snippet
{@snippet lang = JSON :
-
INTERPOLATION_CODEC
private static final com.mojang.serialization.Codec<net.minecraft.client.animation.AnimationChannel.Interpolation> INTERPOLATION_CODECinvalid @snippet
{@snippet lang = JSON :
-
CHANNEL_CODEC
public static final com.mojang.serialization.MapCodec<net.minecraft.client.animation.AnimationChannel> CHANNEL_CODEC{ "keyframes": [ { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" } ], "target": "minecraft:rotation" }
-
NAMED_CHANNEL_CODEC
private static final com.mojang.serialization.Codec<it.unimi.dsi.fastutil.Pair<String,net.minecraft.client.animation.AnimationChannel>> NAMED_CHANNEL_CODEC{ "bone": "head", "keyframes": [ { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" } ], "target": "minecraft:rotation" }
-
CODEC
public static final com.mojang.serialization.Codec<net.minecraft.client.animation.AnimationDefinition> CODEC{ "length": 1.125, "loop": true, "animations": [ { "bone": "head", "keyframes": [ { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" } ] } ] }
-
-
Constructor Details
-
AnimationParser
private AnimationParser()
-
-
Method Details
-
keyframeCodec
static com.mojang.serialization.Codec<net.minecraft.client.animation.Keyframe> keyframeCodec(AnimationTarget target) { "timestamp": 0.5, "target": [22.5, 0.0, 0.0], "interpolation": "minecraft:linear" }
-
keyframeTargetToUnaryOp
private static UnaryOperator<org.joml.Vector3f> keyframeTargetToUnaryOp(AnimationKeyframeTarget target)
-