net.minecraft.inventory.InventoryLargeChest Java Examples
The following examples show how to use
net.minecraft.inventory.InventoryLargeChest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CraftInventoryDoubleChest.java From Kettle with GNU General Public License v3.0 | 5 votes |
public CraftInventoryDoubleChest(InventoryLargeChest largeChest) { super(largeChest); if (largeChest.upperChest instanceof InventoryLargeChest) { left = new CraftInventoryDoubleChest((InventoryLargeChest) largeChest.upperChest); } else { left = new CraftInventory(largeChest.upperChest); } if (largeChest.lowerChest instanceof InventoryLargeChest) { right = new CraftInventoryDoubleChest((InventoryLargeChest) largeChest.lowerChest); } else { right = new CraftInventory(largeChest.lowerChest); } }
Example #2
Source File: InventoryUtils.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 5 votes |
public static IInventory getChest(TileEntityChest chest) { for (EnumFacing fside : Plane.HORIZONTAL) { if (chest.getWorld().getBlockState(chest.getPos().offset(fside)).getBlock() == chest.getBlockType()) return new InventoryLargeChest("container.chestDouble", (TileEntityChest) chest.getWorld().getTileEntity(chest.getPos().offset(fside)), chest); } return chest; }
Example #3
Source File: StaticUtils.java From BigReactors with MIT License | 5 votes |
public static IInventory checkForDoubleChest(World worldObj, IInventory te, int x, int y, int z) { for(ForgeDirection dir : chestDirections) { if(worldObj.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.chest) { TileEntity otherTe = worldObj.getTileEntity(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); if(otherTe instanceof IInventory) { return new InventoryLargeChest("Large Chest", te, (IInventory)otherTe); } } } // Not a large chest, so just return the single chest. return te; }
Example #4
Source File: CraftInventoryDoubleChest.java From Kettle with GNU General Public License v3.0 | 4 votes |
public CraftInventoryDoubleChest(CraftInventory left, CraftInventory right) { super(new InventoryLargeChest("Large chest", (ILockableContainer) left.getInventory(), (ILockableContainer) right.getInventory())); this.left = left; this.right = right; }