diff --git a/src/main/java/me/andrew/gravitychanger/mixin/LivingEntityMixin.java b/src/main/java/me/andrew/gravitychanger/mixin/LivingEntityMixin.java index ae70178..bbb3d1f 100644 --- a/src/main/java/me/andrew/gravitychanger/mixin/LivingEntityMixin.java +++ b/src/main/java/me/andrew/gravitychanger/mixin/LivingEntityMixin.java @@ -357,7 +357,7 @@ private double redirect_tick_getX_0(LivingEntity livingEntity) { private double redirect_tick_getZ_0(LivingEntity livingEntity) { Direction gravityDirection = ((EntityAccessor) livingEntity).gravitychanger$getAppliedGravityDirection(); if(gravityDirection == Direction.DOWN) { - return livingEntity.getX(); + return livingEntity.getZ(); } return RotationUtil.vecWorldToPlayer(livingEntity.getX() - livingEntity.prevX, livingEntity.getY() - livingEntity.prevY, livingEntity.getZ() - livingEntity.prevZ, gravityDirection).z + livingEntity.prevZ; diff --git a/src/main/java/me/andrew/gravitychanger/mixin/client/PlayerEntityRendererMixin.java b/src/main/java/me/andrew/gravitychanger/mixin/client/PlayerEntityRendererMixin.java index 941be10..5bee4cd 100644 --- a/src/main/java/me/andrew/gravitychanger/mixin/client/PlayerEntityRendererMixin.java +++ b/src/main/java/me/andrew/gravitychanger/mixin/client/PlayerEntityRendererMixin.java @@ -24,6 +24,9 @@ public abstract class PlayerEntityRendererMixin { ) private Vec3d modify_setupTransforms_Vec3d_0(Vec3d vec3d, AbstractClientPlayerEntity abstractClientPlayerEntity, MatrixStack matrixStack, float f, float g, float h) { Direction gravityDirection = ((EntityAccessor) abstractClientPlayerEntity).gravitychanger$getAppliedGravityDirection(); + if(gravityDirection == Direction.DOWN) { + return vec3d; + } return RotationUtil.vecWorldToPlayer(vec3d, gravityDirection); }