First-person Model (Forge/Fabric)

First-person Model (Forge/Fabric)

4M Downloads

No check for sneak offset when swimming.

SemmieDev opened this issue ยท 1 comments

commented

For if you didn't know, you can sneak underwater. Nothing will happen really, but I am not sure if your name tag goes transparent. Anyway the bug is if you do that, the mod offsets the player so the players body will clip inside the view as seen in this picture:
2020-08-21_17 35 21
A fix for this would be extremely easy, so easy in fact that I already fixed it. All I did was improving a simple check. The fixed check will be down here. Anyway if you want to make your own fix of it I am fine with that.

Found in class main.java.de.tr7zw.firstperson.StaticMixinMethods, line 39:
if(abstractClientPlayerEntity_1.isSneaking() && !MinecraftClient.getInstance().player.isInSwimmingPose()){

commented

I swapped the sneaking and swimming check. Since only one should be active anyway, checking swimming before sneaking fixes the issue(now sneaking while swimming doesn't change anything).