Fix slot desync

General patch fixing slot desyncs between the server and client that
result from cancelled events/paper introduced logic.

Co-authored-by: Minecrell <minecrell@minecrell.net>
Co-authored-by: Newwind <support@newwindserver.com>
This commit is contained in:
Jake Potrebic
2023-08-23 13:22:09 -07:00
parent 1fc4ca9178
commit 7dcff24771
9 changed files with 159 additions and 152 deletions

View File

@@ -61,7 +61,7 @@
+ if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {
+ blockstate.update(true, false);
+
+ if (this instanceof SolidBucketItem) {
+ if (true) { // Paper - if the event is called here, the inventory should be updated
+ ((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
+ }
+ return InteractionResult.FAIL;