Cancelled block place (spawn protection) causes inventory desync
The bug
Enable spawn protection. Attempt to place a block. The block will not place, however it will be removed from your inventory. Relog, or click the empty slot and it will reappear.
With recent (1.15 snapshots) changes moving item usage to the client-side as well to get correct arm movement, this affects even more items, e.g. fire charges used to ignite camp fires.
Code analysis
Code analysis by Marcono1234 can be found in this comment.
2016-03-06, 01:33 AM
2024-12-09, 01:06 PM
21
13
Minecraft 1.9 - 1.21.4
Minecraft 1.9, Minecraft 1.10.2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, 1.15 Pre-Release 2, 1.15.1, 1.15.2 Pre-release 2, 1.15.2, 20w51a, 1.16.5, 21w18a, 21w19a, 21w20a, 1.17.1, 1.18.1, 1.18.2, 22w15a, 1.19, 1.19.2, 1.19.3, 1.19.4, 1.20.1, 1.21, 1.21.4
-