Package net.minecraft.item

Examples of net.minecraft.item.ItemStack.copy()


    Slot currentSlot = (Slot)inventorySlots.get(slotID);

    if(currentSlot != null && currentSlot.getHasStack())
    {
      ItemStack slotStack = currentSlot.getStack();
      stack = slotStack.copy();

      if(slotID >= 0 && slotID <= 26)
      {
        if(!mergeItemStack(slotStack, 27, inventorySlots.size(), false))
        {
View Full Code Here


    Slot currentSlot = (Slot)inventorySlots.get(slotID);

    if(currentSlot != null && currentSlot.getHasStack())
    {
      ItemStack slotStack = currentSlot.getStack();
      stack = slotStack.copy();

      if(ChargeUtils.canBeDischarged(slotStack))
      {
        if(slotID != 27)
        {
View Full Code Here

    Slot currentSlot = (Slot)inventorySlots.get(slotID);

    if(currentSlot != null && currentSlot.getHasStack())
    {
      ItemStack slotStack = currentSlot.getStack();
      stack = slotStack.copy();

      if(slotStack.getItem() instanceof IGasItem)
      {
        if(slotID != 0)
        {
View Full Code Here

    Slot currentSlot = (Slot)inventorySlots.get(slotID);

    if(currentSlot != null && currentSlot.getHasStack())
    {
      ItemStack slotStack = currentSlot.getStack();
      stack = slotStack.copy();

      if(RecipeHandler.getItemToGasOutput(slotStack, false, Recipe.CHEMICAL_DISSOLUTION_CHAMBER.get()) != null)
      {
        if(slotID != 1)
        {
View Full Code Here

    Slot currentSlot = (Slot)inventorySlots.get(slotID);

    if(currentSlot != null && currentSlot.getHasStack())
    {
      ItemStack slotStack = currentSlot.getStack();
      stack = slotStack.copy();

      if(slotID == 1 || slotID == 3)
      {
        if(!mergeItemStack(slotStack, 4, inventorySlots.size(), true))
        {
View Full Code Here

        ItemStack itemstack = null;
        Slot slot = (Slot) inventorySlots.get(i);
        if (slot != null && slot.getHasStack())
        {
            ItemStack itemstack1 = slot.getStack();
            itemstack = itemstack1.copy();
            if (i == 0)
            {
                if (!mergeItemStack(itemstack1, 10, 46, true))
                {
                    return null;
View Full Code Here

        Slot slot = (Slot) this.inventorySlots.get(par2);

        if (slot != null && slot.getHasStack())
        {
            ItemStack itemstack1 = slot.getStack();
            itemstack = itemstack1.copy();

            if (par2 == 2)
            {
                if (!this.mergeItemStack(itemstack1, 3, 39, true))
                {
View Full Code Here

      {
        ItemStack currentStack = contents[slot];
        if (currentStack != null && currentStack.getItem() instanceof IElectricItem)
        {
          // Test if the item is fully charged (cannot accept any more power).
          if (ElectricItem.charge(currentStack.copy(), 1, baseTier, false, true) == 0)
          {
            contents[Info.CB_SLOT_OUTPUT] = currentStack;
            contents[slot] = null;
            this.onInventoryChanged();
            break;
View Full Code Here

    int numSlots = _entity.getSizeInventory();

    if(slotObject != null && slotObject.getHasStack())
    {
      ItemStack stackInSlot = slotObject.getStack();
      stack = stackInSlot.copy();

      if(slot < numSlots)
      {
        if(!mergeItemStack(stackInSlot, numSlots, inventorySlots.size(), true))
        {
View Full Code Here

    int numSlots = _port.getSizeInventory();

    if(slotObject != null && slotObject.getHasStack())
    {
      ItemStack stackInSlot = slotObject.getStack();
      stack = stackInSlot.copy();

      if(slot < numSlots)
      {
        if(!mergeItemStack(stackInSlot, numSlots, inventorySlots.size(), true))
        {
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.