From e45c237e8202af427885b45a4a116c7b76a0c058 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 25 Sep 2023 01:41:43 +0100 Subject: [PATCH] Fixed incorrect riding position --- src/main/java/com/minelittlepony/client/PonyBounds.java | 2 +- .../minelittlepony/client/mixin/MixinClientPlayerEntity.java | 4 +--- .../client/render/entity/AbstractPonyRenderer.java | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/minelittlepony/client/PonyBounds.java b/src/main/java/com/minelittlepony/client/PonyBounds.java index 7f75e7b2..46a38a09 100644 --- a/src/main/java/com/minelittlepony/client/PonyBounds.java +++ b/src/main/java/com/minelittlepony/client/PonyBounds.java @@ -31,7 +31,7 @@ public class PonyBounds { float delta = MinecraftClient.getInstance().getTickDelta(); Entity vehicle = entity.getVehicle(); - double vehicleOffset = vehicle == null ? 0 : vehicle.getHeight() - entity.getRidingOffset(vehicle); + double vehicleOffset = vehicle == null ? 0 : vehicle.getHeight(); return new Vec3d( MathHelper.lerp(delta, entity.prevX, entity.getX()), diff --git a/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java b/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java index 93d4a425..9258de2e 100644 --- a/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java +++ b/src/main/java/com/minelittlepony/client/mixin/MixinClientPlayerEntity.java @@ -55,10 +55,8 @@ abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity implem value *= factor; if (hasVehicle()) { - value += getVehicle().getEyeHeight(getVehicle().getPose()); - value -= getRidingOffset(getVehicle()); + value += getVehicle().getHeight(); } - return Math.max(value, 0.1F); } } diff --git a/src/main/java/com/minelittlepony/client/render/entity/AbstractPonyRenderer.java b/src/main/java/com/minelittlepony/client/render/entity/AbstractPonyRenderer.java index 767762cd..7b7d0d5d 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/AbstractPonyRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/entity/AbstractPonyRenderer.java @@ -99,7 +99,7 @@ public abstract class AbstractPonyRenderer