Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaider10 committed Oct 19, 2021
1 parent 796ca66 commit 4bb6066
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4bb6066

Please sign in to comment.