Examples of canInsertItem()


Examples of thaumic.tinkerer.common.block.tile.TileRepairer.canInsertItem()

    TileRepairer repairer = (TileRepairer) par1World.getTileEntity(par2, par3, par4);
    ItemStack stack = repairer.getStackInSlot(0);

    if (stack == null) {
      ItemStack playerStack = par5EntityPlayer.getCurrentEquippedItem();
      if (repairer.canInsertItem(0, playerStack, 1)) {
        repairer.setInventorySlotContents(0, playerStack.splitStack(1));

        if (playerStack.stackSize <= 0)
          par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.