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
To check: box[13.0, 4.0, 8.0 -> 14.0, 4.875, 9.0]
Client player: box[14.0, 4.0, 8.080747030085668 -> 14.600000023841854, 5.799999952316284, 8.680747053927526]
Server player: box[13.999999999999998, 4.0, 8.085848427457286 -> 14.600000023841856, 5.799999952316284, 8.685848451299144]
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.
Linked issues
is duplicated by 10
Comments 46
it's uploading: http://youtu.be/eJWHE-nIivQ
I agree that the behavior in the above video is similar to what I experienced when I made this report.
Since I always had problems trying to reproduce this bug, can someone please check if this is still an issue in the latest development snapshot?
Unable to reproduce. Please provide screenshots.