The bug
When you jump and place a fence post under you you will get inside off the fence post.
Note: This works correctly for fence gates and cobblestone walls.
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The class BlockFence
is not overriding the method net.minecraft.block.Block.getCollisionBoundingBox(IBlockState, IBlockAccess, BlockPos)
and therefore returns the hitbox instead of the collision box.
Linked issues
is duplicated by 17
relates to 2
Attachments
Comments 9
Confirmed for 1.8.1-pre2.
Suggested fix for the devs:
Replace the 1.5 block high collision box of the fence with a 1 block high one that matches the visual shape, and then add an invisible 0.5 block high collision box on top. This will not be a perfect solution, it just means that if a player manages to fall through the top 0.5 block section, they will be standing on what is effectively a 1 block high internal support platform. Due to the fact that the fence is only visually 1 block high anyway, this would mean a player wouldn't even appear to be inside the fence.
Confirmed in 1.8.3. The fact that you can fall though it is intended, you are inside the fence's hitbox, and that is how crouching works. The actual bug is that you can place the fence there in the first place. The game should detect that the block would intersect your hitbox and should prevent the placement like it does with other blocks.
Confirmed.
Ouch. That looks like it hurt. (Sic!)