diff --git a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/MixinUtil.java b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/MixinUtil.java index e7a46b1..e40d948 100644 --- a/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/MixinUtil.java +++ b/common/src/main/java/net/derfruhling/minecraft/create/trainperspective/MixinUtil.java @@ -27,7 +27,7 @@ public static float getExtraYRot(Perspective persp, float xRot, float yRot, floa public static Vector3d applyStandingCameraTranslation(Player player, double x, double y, double z, Perspective persp, float f) { var lean = persp.getLean(f) * Mth.DEG_TO_RAD; var yaw = persp.getYaw(f) * Mth.DEG_TO_RAD; - var height = player.getEyeHeight(); + var height = y - player.getY(); var newY = y + ((height * Mth.cos(lean)) - height); var leanSin = Mth.sin(lean); var newZ = z - (height * Mth.sin(yaw) * leanSin);