Mojira Archive
MC-113136

Players can perform critical attacks while sinking in lava

The bug

While swimming in lava you deal always critical hits unless you sprint or touch the ground.

https://youtu.be/zNScfQcK-bw

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 [Mod] Avoma can be found in this comment.