mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-30 19:28:14 +02:00
Fix cancelled HangingPlaceEvent inventory desync (#12161)
This commit is contained in:
parent
fc56c728c0
commit
f63dbeafde
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue