Fix double chest identification (#11812)

This commit is contained in:
Lulu13022002
2024-12-24 22:57:24 +01:00
committed by GitHub
parent b8a0541ccf
commit 9e2d39cd26
3 changed files with 35 additions and 21 deletions

View File

@@ -919,7 +919,7 @@
+ ((Container) menu).stopOpen(this);
+ } else if (menu instanceof net.minecraft.world.level.block.ChestBlock.DoubleInventory doubleInventory) {
+ // SPIGOT-5355 - double chests too :(
+ doubleInventory.inventorylargechest.stopOpen(this);
+ doubleInventory.container.stopOpen(this);
+ // Paper start - Fix InventoryOpenEvent cancellation
+ } else if (!this.enderChestInventory.isActiveChest(null)) {
+ this.enderChestInventory.stopOpen(this);