修复小鸟4号位旋转
This commit is contained in:
parent
708b0e27b1
commit
0ff0e619df
1 changed files with 4 additions and 1 deletions
|
@ -17,9 +17,12 @@ public class LivingEntityRendererMixin<T extends LivingEntity> {
|
||||||
@Inject(method = "setupRotations", at = @At("TAIL"))
|
@Inject(method = "setupRotations", at = @At("TAIL"))
|
||||||
public void render(T entity, PoseStack matrices, float animationProgress, float bodyYaw, float tickDelta, CallbackInfo ci) {
|
public void render(T entity, PoseStack matrices, float animationProgress, float bodyYaw, float tickDelta, CallbackInfo ci) {
|
||||||
if (entity.getRootVehicle() != entity && entity.getRootVehicle() instanceof Ah6Entity ah6Entity) {
|
if (entity.getRootVehicle() != entity && entity.getRootVehicle() instanceof Ah6Entity ah6Entity) {
|
||||||
if (entity == ah6Entity.getNthEntity(2) || entity == ah6Entity.getNthEntity(3)) {
|
if (entity == ah6Entity.getNthEntity(2)) {
|
||||||
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
||||||
matrices.mulPose(Axis.ZP.rotationDegrees(ah6Entity.getViewXRot(tickDelta)));
|
matrices.mulPose(Axis.ZP.rotationDegrees(ah6Entity.getViewXRot(tickDelta)));
|
||||||
|
} else if (entity == ah6Entity.getNthEntity(3)) {
|
||||||
|
matrices.mulPose(Axis.XP.rotationDegrees(ah6Entity.getRoll(tickDelta)));
|
||||||
|
matrices.mulPose(Axis.ZP.rotationDegrees(-ah6Entity.getViewXRot(tickDelta)));
|
||||||
} else {
|
} else {
|
||||||
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getViewXRot(tickDelta)));
|
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getViewXRot(tickDelta)));
|
||||||
matrices.mulPose(Axis.ZP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
matrices.mulPose(Axis.ZP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue