添加履带旋转

This commit is contained in:
Atsuihsio 2025-03-12 21:56:46 +08:00
parent 5e340c2cc0
commit 78a5b59f8b

View file

@ -132,6 +132,14 @@ public class Yx100Renderer extends GeoEntityRenderer<Yx100Entity> {
bone.setPosZ(Mth.lerp(partialTick, getBoneMoveZ(tO2), getBoneMoveZ(t2)));
}
if (name.equals("trackLRot" + i)) {
bone.setRotX(Mth.lerp(partialTick, getBoneRotX(tO), getBoneRotX(t)) * Mth.DEG_TO_RAD);
}
if (name.equals("trackRRot" + i)) {
bone.setRotX(Mth.lerp(partialTick, getBoneRotX(tO2), getBoneRotX(t2)) * Mth.DEG_TO_RAD);
}
}
super.renderRecursively(poseStack, animatable, bone, renderType, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, red, green, blue, alpha);
}
@ -143,4 +151,8 @@ public class Yx100Renderer extends GeoEntityRenderer<Yx100Entity> {
public float getBoneMoveZ(float t) {
return z;
}
public float getBoneRotX(float t) {
return x;
}
}