minecraft-src/net/minecraft/client/model/geom/PartPose.java
2025-07-04 01:41:11 +03:00

36 lines
1,015 B
Java

package net.minecraft.client.model.geom;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
@Environment(EnvType.CLIENT)
public class PartPose {
public static final PartPose ZERO = offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
public final float x;
public final float y;
public final float z;
public final float xRot;
public final float yRot;
public final float zRot;
private PartPose(float x, float y, float z, float xRot, float yRot, float zRot) {
this.x = x;
this.y = y;
this.z = z;
this.xRot = xRot;
this.yRot = yRot;
this.zRot = zRot;
}
public static PartPose offset(float x, float y, float z) {
return offsetAndRotation(x, y, z, 0.0F, 0.0F, 0.0F);
}
public static PartPose rotation(float xRot, float yRot, float zRot) {
return offsetAndRotation(0.0F, 0.0F, 0.0F, xRot, yRot, zRot);
}
public static PartPose offsetAndRotation(float x, float y, float z, float xRot, float yRot, float zRot) {
return new PartPose(x, y, z, xRot, yRot, zRot);
}
}