SPIGOT-4741: InventoryHolder no longer returns DoubleChest

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-25 13:57:18 +10:00
parent badc255efc
commit 4198bf7e21
2 changed files with 69 additions and 2 deletions

View File

@@ -50,8 +50,8 @@ public class CraftChest extends CraftLootable<TileEntityChest> implements Chest
BlockChest blockChest = (BlockChest) (this.getType() == Material.CHEST ? Blocks.CHEST : Blocks.TRAPPED_CHEST);
ITileInventory nms = blockChest.getInventory(data, world.getHandle(), this.getPosition());
if (nms instanceof InventoryLargeChest) {
inventory = new CraftInventoryDoubleChest((InventoryLargeChest) nms);
if (nms instanceof BlockChest.DoubleInventory) {
inventory = new CraftInventoryDoubleChest(((BlockChest.DoubleInventory) nms).inventorylargechest);
}
return inventory;
}