NeoForge
NeoForge copied to clipboard
Cancelling BlockEvent.EntityPlaceEvent causes itemstack desync
MC 1.20.4, NF 20.4.0-beta
if i cancel BlockEvent.EntityPlaceEvent (server-only event for placing blocks), blockitem count is shrunk on client (block disappears from hotbar if there was only one piece). opening inventory and moving items around fixes hotbar (block reappears on client).
I'm not sure this event will ever be able to provide such behavior. You may want to look into using the UseItemOnBlockEvent, which fires on both sides, to cancel block placement.
If this event cannot be reasonable canceled, it should just not be cancelable.