diff --git a/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java b/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java index 39ba0db..57f4228 100644 --- a/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java +++ b/src/main/java/com/minelittlepony/bigpony/minelittlepony/Main.java @@ -27,7 +27,10 @@ public void onInitializeClient() { INSTANCE = this; PonyModelPrepareCallback.EVENT.register((entity, model, mode) -> { - if (BigPony.getInstance().getConfig().useDetectedPonyScaling.get() && isPony((PlayerEntity)entity)) { + if (BigPony.getInstance().getConfig().useDetectedPonyScaling.get() + && entity instanceof PlayerEntity player + && BigPonyClient.isClientPlayer(player) + && isPony(player)) { model.getAttributes().visualHeight = entity.getHeight() / model.getSize().scaleFactor(); } }); diff --git a/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinLivingEntityRenderer.java b/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinLivingEntityRenderer.java index bc30631..cb9ebf5 100644 --- a/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinLivingEntityRenderer.java +++ b/src/main/java/com/minelittlepony/bigpony/mixin/client/MixinLivingEntityRenderer.java @@ -13,17 +13,13 @@ @Mixin(LivingEntityRenderer.class) abstract class MixinLivingEntityRenderer> { - - - @ModifyVariable(method = "Lnet/minecraft/client/render/entity/LivingEntityRenderer;setupTransforms(" - + "Lnet/minecraft/entity/LivingEntity;" - + "Lnet/minecraft/client/util/math/MatrixStack;" - + "FFF" - + ")V", - at = @At("HEAD"), - ordinal = 3 + @ModifyVariable( + method = "setupTransforms", + at = @At("HEAD"), + ordinal = 3, + argsOnly = true ) - private float modifyScaleonSetupTransforms(float initial, T entity, MatrixStack matrices) { + private float modifyScaleOnSetupTransforms(float initial, T entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta, float vanillaScale) { if (entity instanceof Scaling.Holder holder) { BodyScale scale = holder.getScaling().getRenderedBodyScale(); matrices.scale(scale.x(), scale.y(), scale.z());