Package colonies.src.buildings

Examples of colonies.src.buildings.TileEntityColoniesChest


  }
 
  private boolean getPickaxeFromChest(int x, int y, int z) {
    TileEntity entity = worldObj.getBlockTileEntity(x, y, z);
    if (entity instanceof TileEntityColoniesChest) {
      TileEntityColoniesChest chest = (TileEntityColoniesChest)entity;
      int invSize = chest.getSizeInventory();
      for (int i = 0; i < invSize; i++) {
        ItemStack stack = chest.getStackInSlot(i);
        if (stack != null && isPickaxe(stack.getItem())) {
          setPickaxe(stack.getItem());
          ((TileEntityColoniesChest)entity).setInventorySlotContents(i, ((TileEntityColoniesChest)entity).decrStackSize(0, stack.stackSize-1));
          entity.onInventoryChanged();
          return true;
View Full Code Here

TOP

Related Classes of colonies.src.buildings.TileEntityColoniesChest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.