Placing a block in a position that is valid according to the client but invalid according to the server will make it disappear from the client-side inventory until the inventory spot where it was gets manually updated.
Instead, the server should tell the client that removing that item from the inventory client-side to mask lag was an incorrect action because the block didn't get placed.
Alternatively the underlying issue could be fixed that makes the server consider the block placement in these cases invalid in the first place, because it is never actually invalid block placement when this happens, but appears to be an interpolation issue.
This is an issue that has been present since the SMP/SSP-merge in Minecraft 1.3.1 and happens in survival all the time. However, it usually goes by unnoticed in survival because of the figures. (One in a stack of 30+ items missing isn't very obvious, especially if it gets added again as soon as you place another item from that stack.)
It is a huge issue in custom maps with a limited amount of blocks though.
New steps to reproduce in written form:
(see attached gif)
1. Get a block
2. Look down at an angle and sneak
3. Spam right click to make block placement attempts inside you while slowly moving backwards
4. Stop spamming right click as soon as the block disappears from your inventory but didn't get placed
Old steps to reproduce in video form:
https://youtu.be/HF9xrRwrNcA
Because of the seemingly random nature of this issue, I decided to make a video on how to reproduce it with relative consistency, as following written steps to reproduce could easily lead to the assumption that it is not reproducible.
Old steps to reproduce in written form:
1. Create some sort of stress for your server (can be singleplayer).
Frequent lighting updates work great. The more stress on your server, the more often you will be able to reproduce the issue. Note however that this can and does happen — albeit more rarely — without any stress on the server whatsoever.
2. Run towards a block
3. Place a block onto the block you are running towards right before you actually hit it.
4. Result: The block you should have placed didn't get placed, but is still missing from your client-side inventory.
Technically though it is still in your inventory and updating the inventory spot where it should be (by dropping it, clicking it, attempting to place it or by relogging) will make it re-appear.
Important:
This desync can and does happen in cases very different from the case in the steps to reproduce. It can and does happen on a flat floor, it can and does happen on ceilings and if there is a lot of stress on the server it can and does happen when you attempt to place blocks more than one block away from your character. The cases in the steps to reproduce are just the cases that are the easiest to reproduce.
Update:
-added gif to show that this still is an issue in the current version (16w44a)
Linked issues
is duplicated by 14
relates to 3
Attachments
Comments 26
Sound related to MC-12363
I guess it is a similar sort of desync as the end result is identical (wrong client-side inventory), and I can see an additional "update your inventory, client!"-message after the client failed to perform an action "band-aid-fixing" both issues.
But this report is about specific instances where the server thinks you couldn't place a block because you tried to place it inside your character model even though that can clearly not be the case, which is something that shouldn't happen in the first place, even if the band-aid-fix still makes sense. 😉
Relates to MC-99075
Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
This is an automated comment on any open or reopened issue with out-of-date affected versions.
Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
Updated it. Again, (in singleplayer) this happens in any version since the 1.3.1 SSP/SMP merge.
The issue shown in the video using cobweb.mp4
is MC-224949.
Sound related to MC-12363