Skip to content

Commit

Permalink
Fix swimming in f5 hiding the body
Browse files Browse the repository at this point in the history
  • Loading branch information
tr7zw committed Jan 21, 2024
1 parent 02faa9c commit 3be55a3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public void hideHead(T livingEntity, float f, float g, float h, float i, float j
((ModelPartBase) (Object) playerModel.rightSleeve).setHidden();
}
}
if (livingEntity instanceof AbstractClientPlayer player && (Object) this instanceof PlayerModel<?> playerModel
if (FirstPersonModelCore.instance.isRenderingPlayer() && livingEntity instanceof AbstractClientPlayer player
&& (Object) this instanceof PlayerModel<?> playerModel
&& FirstPersonModelCore.instance.getLogicHandler().isSwimming(player)) {
((ModelPartBase) (Object) playerModel.body).setHidden();
((ModelPartBase) (Object) ((PlayerModelAccess) this).getCloak()).setHidden();
Expand Down

0 comments on commit 3be55a3

Please sign in to comment.