From 3be55a3b05929502dcec1766e7c0215d0f5256fb Mon Sep 17 00:00:00 2001 From: tr7zw Date: Sun, 21 Jan 2024 01:26:02 +0100 Subject: [PATCH] Fix swimming in f5 hiding the body --- .../java/dev/tr7zw/firstperson/mixins/HumanoidModelMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/tr7zw/firstperson/mixins/HumanoidModelMixin.java b/src/main/java/dev/tr7zw/firstperson/mixins/HumanoidModelMixin.java index fb69fd6e..9816e4b3 100644 --- a/src/main/java/dev/tr7zw/firstperson/mixins/HumanoidModelMixin.java +++ b/src/main/java/dev/tr7zw/firstperson/mixins/HumanoidModelMixin.java @@ -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();