Package net.minecraft.inventory

Examples of net.minecraft.inventory.IInventory.markDirty()


            int maxSize = stack.getMaxStackSize();
            stack.stackSize = remove(par1ItemStack, maxSize);
            if (stack.stackSize != 0) {
              if (inv.isItemValidForSlot(slot, stack) && (!(inv instanceof ISidedInventory) || ((ISidedInventory) inv).canInsertItem(slot, stack, par7))) {
                inv.setInventorySlotContents(slot, stack);
                inv.markDirty();
                set = true;
              }
            }
          } else if (stackInSlot.getItem() == Item.getItemFromBlock(bBlock) && stackInSlot.getItemDamage() == bmeta) {
            int maxSize = stackInSlot.getMaxStackSize();
View Full Code Here


          } else if (stackInSlot.getItem() == Item.getItemFromBlock(bBlock) && stackInSlot.getItemDamage() == bmeta) {
            int maxSize = stackInSlot.getMaxStackSize();
            int missing = maxSize - stackInSlot.stackSize;
            if (inv.isItemValidForSlot(slot, stackInSlot) && (!(inv instanceof ISidedInventory) || ((ISidedInventory) inv).canInsertItem(slot, stackInSlot, par7))) {
              stackInSlot.stackSize += remove(par1ItemStack, missing);
              inv.markDirty();
              set = true;
            }
          }
        }
      } else {
View Full Code Here

                ItemStack used = emitItemToTransporter(front, invStack, filter.color, min);
               
                if(used != null)
                {
                  invStack.use(used.stackSize);
                  inventory.markDirty();
                  setActive(true);
                  sentItems = true;
                 
                  break;
                }
View Full Code Here

              ItemStack used = emitItemToTransporter(front, invStack, color, 0);
             
              if(used != null)
              {
                invStack.use(used.stackSize);
                inventory.markDirty();
                setActive(true);
              }
            }
          }
View Full Code Here

        else
        {
          for (int x = 0; x < config.getSizeInventory(); x++)
            c.setInventorySlotContents( x, config.getStackInSlot( x ) );

          c.markDirty();
        }
      }
      else if ( cm.getSetting( Settings.COPY_MODE ) == CopyMode.CLEAR_ON_REMOVE )
      {
        for (int x = 0; x < config.getSizeInventory(); x++)
View Full Code Here

      if ( c != null )
      {
        for (int x = 0; x < config.getSizeInventory(); x++)
          c.setInventorySlotContents( x, config.getStackInSlot( x ) );

        c.markDirty();
      }
    }
  }

  @Override
View Full Code Here

    @Override
    public ItemStack decrStackSize(int i, int j)
    {
      IInventory inv = getCellUpgradeInventory();
      ItemStack is = inv.decrStackSize( i, j );
      inv.markDirty();
      return is;
    }

    @Override
    public ItemStack getStackInSlotOnClosing(int i)
View Full Code Here

    @Override
    public ItemStack getStackInSlotOnClosing(int i)
    {
      IInventory inv = getCellUpgradeInventory();
      ItemStack is = inv.getStackInSlotOnClosing( i );
      inv.markDirty();
      return is;
    }

    @Override
    public void setInventorySlotContents(int i, ItemStack itemstack)
View Full Code Here

    @Override
    public void setInventorySlotContents(int i, ItemStack itemstack)
    {
      IInventory inv = getCellUpgradeInventory();
      inv.setInventorySlotContents( i, itemstack );
      inv.markDirty();
    }

    @Override
    public String getInventoryName()
    {
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.