mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
SPIGOT-4197: Account for double trapped chests
This commit is contained in:
parent
8592585b9f
commit
03c1273b59
@ -52,7 +52,8 @@ public class CraftChest extends CraftLootable<TileEntityChest> implements Chest
|
||||
int z = this.getZ();
|
||||
CraftWorld world = (CraftWorld) this.getWorld();
|
||||
|
||||
ITileInventory nms = ((BlockChest) Blocks.CHEST).getInventory(data, world.getHandle(), new BlockPosition(x, y, z), true);
|
||||
BlockChest blockChest = (BlockChest) (this.getType() == Material.CHEST ? Blocks.CHEST : Blocks.TRAPPED_CHEST);
|
||||
ITileInventory nms = blockChest.getInventory(data, world.getHandle(), new BlockPosition(x, y, z), true);
|
||||
|
||||
if (nms instanceof InventoryLargeChest) {
|
||||
inventory = new CraftInventoryDoubleChest((InventoryLargeChest) nms);
|
||||
|
Loading…
Reference in New Issue
Block a user