mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-4197: Account for double trapped chests
By: md_5 <git@md-5.net>
This commit is contained in:
parent
a6d591c2ae
commit
a0dd99dc78
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue