-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w16a, Minecraft 17w16b, Minecraft 17w17a, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w09a, Minecraft 18w11a, Minecraft 18w14a, Minecraft 18w14b, Minecraft 1.13-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, 1.14.4, 19w34a, 19w35a, 19w40a, 20w46a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w08b, 21w13a, 21w15a, 1.17.1, 1.18.1, 1.18.2, 22w16b, 22w18a, 1.19 Pre-release 4, 1.19, 1.19.2, 1.21.1
-
Confirmed
-
Combat
The bug
While swimming in lava you deal always critical hits unless you sprint or touch the ground.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(Entity) only tests if the player is in water and because lava does not reset the fall distance you can always deal critical hits.
Additional code analysis by Avoma can be found in this comment.