Package appeng.api.me.util

Examples of appeng.api.me.util.IMEInventoryHandler.extractItems()


        if ((world.isBlockIndirectlyGettingPowered(x, y, z) || world.isBlockIndirectlyGettingPowered(x, y + 1, z)) && unpowered)
        {
          if (((TileEntityMEDropper) world.getBlockTileEntity(x, y, z)).getGrid() != null)
          {
            IMEInventoryHandler cellArray = ((TileEntityMEDropper) world.getBlockTileEntity(x, y, z)).getGrid().getCellArray();
            if (cellArray != null && cellArray.extractItems(Util.createItemStack(request)) != null)
            {
              dispense(world, x, y, z, ((TileEntityMEDropper) world.getBlockTileEntity(x, y, z)).getItem().copy());
              unpowered = false;
            }
          }
View Full Code Here


      {
        for (SpecialFluidStack fluidstack : fluidsInNetwork)
        {
          if (fluidstack.getID() == toExport.fluidID && fluidstack.amount >= toExport.amount)
          {
            IAEItemStack takenStack = cellArray.extractItems(Util.createItemStack(new ItemStack(toDrain.getItem(), (int) (toDrain.getStackSize()), toDrain.getItemDamage())));

            if (takenStack == null)
            {
              return false;
            } else if (takenStack.getStackSize() != (int) toDrain.getStackSize())
View Full Code Here

 
      if (fillable > 0)
      {
        IAEItemStack toExtract = Util.createItemStack(new ItemStack(FLUIDDISPLAY.getItemInstance(), fillable, toExport.fluidID));
 
        IAEItemStack extracted = cellArray.extractItems(toExtract);

        grid.useMEEnergy(mode.getCost() * tickRate, "Export Fluid");

        if (extracted != null)
        {
View Full Code Here

      {
        for (IAEItemStack fluidstack : cellArray.getAvailableItems())
        {
          if (fluidstack != null && fluidstack.getItem() instanceof ItemFluidDisplay && fluidstack.getItemDamage() == toExport.fluidID && fluidstack.getStackSize() >= toExport.amount)
          {
            IAEItemStack takenStack = cellArray.extractItems(Util.createItemStack(new ItemStack(toDrain.getItem(), (int) (toDrain.getStackSize()), toDrain.getItemDamage())));

            if (takenStack == null)
            {
              return false;
            } else if (takenStack.getStackSize() != (int) toDrain.getStackSize())
View Full Code Here

    if (!isMachineActive() || toDrain == null || grid == null)
      return 0;
    IMEInventoryHandler cellArray = grid.getCellArray();
    if (cellArray == null)
      return 0;
    IAEItemStack drained = cellArray.extractItems(createFluidItemStack(toDrain));
    if (drained == null)
      return 0;
    if (!doDrain)
      cellArray.addItems(drained);
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.