Examples of addItemStackToInventory()


Examples of net.minecraft.entity.player.InventoryPlayer.addItemStackToInventory()

            itemstack5 = slot2.getStack();
            inventoryPlayer.setInventorySlotContents(p_75144_2_, itemstack5.copy());

            if ((slot2.inventory != inventoryPlayer || !slot2.isItemValid(itemstack3)) && itemstack3 != null) {
              if (l1 > -1) {
                inventoryPlayer.addItemStackToInventory(itemstack3);
                slot2.decrStackSize(itemstack5.stackSize);
                slot2.putStack((ItemStack) null);
                slot2.onPickupFromSlot(player, itemstack5);
              }
            } else {
View Full Code Here

Examples of net.minecraft.entity.player.InventoryPlayer.addItemStackToInventory()

            slot.onPickupFromSlot( player, stackInSlot );
          } else {
            int indx = inventoryPlayer.getFirstEmptyStack();
            if( indx > -1 ) {
              inventoryPlayer.setInventorySlotContents( buttonPressed, stackInSlot );
              inventoryPlayer.addItemStackToInventory( playerStack );
              slot.onPickupFromSlot( player, stackInSlot );
            }
          }
          return stackInSlot;
View Full Code Here

Examples of net.minecraft.entity.player.InventoryPlayer.addItemStackToInventory()

            itemstack5 = slot2.getStack();
            inventoryplayer.setInventorySlotContents(par2, itemstack5.copy());
           
            if((slot2.inventory != inventoryplayer || !slot2.isItemValid(itemstack3)) && itemstack3 != null) {
              if(l1 > -1) {
                inventoryplayer.addItemStackToInventory(itemstack3);
                slot2.decrStackSize(itemstack5.stackSize);
                slot2.putStack((ItemStack)null);
                slot2.onPickupFromSlot(par4EntityPlayer, itemstack5);
              }
            } else {
View Full Code Here

Examples of net.minecraft.src.InventoryPlayer.addItemStackToInventory()

        }
        // Transfer any remaining items in the craft matrix to the player.
        for(int i = 0; i < craftMatrix.getSizeInventory(); i++) {
          ItemStack itemstack = craftMatrix.getStackInSlot(i);
          if(itemstack != null) {
            inventoryPlayer.addItemStackToInventory(itemstack);
            craftMatrix.setInventorySlotContents(i, 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.