The bug
Just when you're on a lily pad you see like if you aren't on the lily pad, you're floating. This could be fixed by either decreasing the size of the lily pad hitbox, or, preferably, thickening the lily pad's model.
How to reproduce
Place a lily pad
Stand on it
Code analysis
Code analysis by @unknown can be found in this comment.
Attachments
Comments 24
The following is based on a decompiled version of MC 1.12.1 using MCP 9.40pre-1.
The field net.minecraft.block.BlockLilyPad.LILY_PAD_AABB
detemines how big the collision box of a lily pad is. Currently, a lily pad's collision box is 0.09375 full blocks high which makes the player seem to float above the lily pad as the lily pad itself doesn't really have a height. Therefore, a simple fix would be to just make the collision box a bit lower (smaller in the y-direction), woah!
// Original values (AxisAlignedBB(x1, y1, z1, x2, y2, z2)
protected static final AxisAlignedBB LILY_PAD_AABB = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.09375D, 0.9375D);
// Modified values (y2 - 0.08)
protected static final AxisAlignedBB LILY_PAD_AABB = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.01375D, 0.9375D);
Even though this does fix the problem, I actually think this "bug" might be intentional. The thing is that when the character is sneaking, its model is lowered down. Since the texture of a lily pad doesn't really have a height, the character glitches through the lily pad a bit when sneaking on it. This glitching becomes even more intense when the collision box of the lily pad is smaller. (default collision box | adjusted collision box)
Anyway, this is how standing on a lily pad looks like with a lower collision box.
Can confirm for MC 1.12.1.