From 2ff66e3824f63fe2d9a00528486cf39e5413a1bd Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 7 Jul 2021 17:09:24 +0200 Subject: [PATCH] Fixed incorrect eye height after dismounting. Fixes #190 --- .../client/mixin/MixinClientPlayerEntity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java b/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java index 885836e0..17d85c2a 100644 --- a/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java +++ b/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java @@ -12,6 +12,7 @@ import net.minecraft.entity.EntityPose; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(ClientPlayerEntity.class) @@ -21,13 +22,12 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem private Pony pony; @Inject(method = "startRiding(Lnet/minecraft/entity/Entity;Z)Z", at = @At("RETURN")) - public void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable info) { + private void onStartRiding(Entity entity, boolean bl, CallbackInfoReturnable info) { calculateDimensions(); } - @Override - public void stopRiding() { - super.stopRiding(); + @Inject(method = "dismountVehicle()Z", at = @At("RETURN")) + private void onStopRiding(CallbackInfo info) { calculateDimensions(); }