mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 05:32:18 -07:00
Fix cancelled HangingPlaceEvent inventory desync (#12161)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/HangingEntityItem.java
|
||||
+++ b/net/minecraft/world/item/HangingEntityItem.java
|
||||
@@ -66,6 +_,19 @@
|
||||
@@ -66,6 +_,20 @@
|
||||
|
||||
if (hangingEntity.survives()) {
|
||||
if (!level.isClientSide) {
|
||||
@@ -14,6 +14,7 @@
|
||||
+ level.getCraftServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ if (player != null) player.containerMenu.sendAllDataToRemote(); // Paper - Fix inventory desync
|
||||
+ return InteractionResult.FAIL;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
Reference in New Issue
Block a user