KeyframeAnimations .java

net.minecraft.client.animation.KeyframeAnimations (class, 21 lines): members: degreeVec, scaleVec, posVec. imports: Vector3f, EnvType, Environment.

net.minecraft.client.animationclass21 linesclient682 B

API Surface (3)

Vector3f posVec(final float x, final float y, final float z)
Vector3f degreeVec(final float x, final float y, final float z)
Vector3f scaleVec(final double x, final double y, final double z)

Full Source

KeyframeAnimations.java21 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.animation;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import org.joml.Vector3f;
6
7
@Environment(EnvType.CLIENT)
8
public class KeyframeAnimations {
9
	public static Vector3f posVec(final float x, final float y, final float z) {
10
		return new Vector3f(x, -y, z);
11
	}
12
13
	public static Vector3f degreeVec(final float x, final float y, final float z) {
14
		return new Vector3f(x * (float) (Math.PI / 180.0), y * (float) (Math.PI / 180.0), z * (float) (Math.PI / 180.0));
15
	}
16
17
	public static Vector3f scaleVec(final double x, final double y, final double z) {
18
		return new Vector3f((float)(x - 1.0), (float)(y - 1.0), (float)(z - 1.0));
19
	}
20
}
21

Decompiled Minecraft 26.3 source of KeyframeAnimations (net/minecraft/client/animation/KeyframeAnimations.java) with Mojang official mappings, stored verbatim on the site.