Description

The bug

Sometimes blocks cannot be placed on a block you directly standing next to. When you place them they appear for a short moment (client-side) but directly afterwards disappear.

How to reproduce

Dig a 1 block deep hole

Move up against any side or corner of the hole

Attempt to place a repeater or comparator on the block you moved towards
→ The repeater will appear and disappear immediately, as if the server thinks you are occupying the space and cannot place a block.

If you cannot reproduce the bug, try sprinting against the block.

Cause

The cause seems to be that the server thinks the player is intersecting with the collision box of the block to be placed while the client thinks he is not.
For example

However, it is interesting that the server let the client move inside the block in the first place.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

Removed part
The reason why the method net.minecraft.network.NetHandlerPlayServer.processPlayer(CPacketPlayer) did not prevent the movement then is because it contracts the player bounding box by 0.0625. Removing this might solve the problem as well, but could result in the player being teleported back when running with the speed effect against a wall or similar.

Edit: Code analysis was partwise wrong. The actual reason is not quite clear.

Attachments

Issue Links

is duplicated by

MC-12029Jumping and placing Redstone repeater will cause repeater to disapear and be lost forever.