Examples of addItems()


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

          {
            if (notImported == null && grid.useMEEnergy(modeCost, "Import Fluid"))
            {
              FluidStack drained = fluidHandler.drain(facing.getOpposite(), (int) toImport.getStackSize(), true);
              if (drained != null)
                cellArray.addItems(toImport.copy());
            }
          }
        } else
        {
          if (notImported == null && grid.useMEEnergy(modeCost, "Import Fluid"))
View Full Code Here

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

        {
          if (notImported == null && grid.useMEEnergy(modeCost, "Import Fluid"))
          {
            FluidStack drained = fluidHandler.drain(facing.getOpposite(), (int) toImport.getStackSize(), true);
            if (drained != null)
              cellArray.addItems(toImport.copy());
          }
        }
      }
    }
  }
View Full Code Here

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

      IMEInventoryHandler cellArray = getGrid().getCellArray();
      if (cellArray != null)
      {
        if (doFill)
        {
          added = cellArray.addItems(temp);
        } else
        {
          added = cellArray.calculateItemAddition(temp);
        }
        if (added == null)
View Full Code Here

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

        if (sim != null)
        {
          return false;
        }

        cellArray.addItems(toFill.copy());
        return true;
      }
    }
    return false;
  }
View Full Code Here

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

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

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

            FluidStack simulation = ((IFluidBlock) Block.blocksList[offsetID]).drain(worldObj, xCoord + orientation.offsetX, yCoord + orientation.offsetY, zCoord + orientation.offsetZ, false);

            if (simulation != null && cellArray.calculateItemAddition(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), simulation.amount, simulation.fluidID))) == null)
            {
              ((IFluidBlock) Block.blocksList[offsetID]).drain(worldObj, xCoord + orientation.offsetX, yCoord + orientation.offsetY, zCoord + orientation.offsetZ, true);
              cellArray.addItems(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), simulation.amount, simulation.fluidID)));
            }
          } else if (offsetID == FluidRegistry.WATER.getBlockID() && offsetMeta == 0)
          {
            if (cellArray.calculateItemAddition(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1000, FluidRegistry.WATER.getID()))) == null)
            {
View Full Code Here

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

          } else if (offsetID == FluidRegistry.WATER.getBlockID() && offsetMeta == 0)
          {
            if (cellArray.calculateItemAddition(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1000, FluidRegistry.WATER.getID()))) == null)
            {
              worldObj.setBlockToAir(xCoord + orientation.offsetX, yCoord + orientation.offsetY, zCoord + orientation.offsetZ);
              cellArray.addItems(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1000, FluidRegistry.WATER.getID())));
            }
          } else if (offsetID == FluidRegistry.LAVA.getBlockID() && offsetMeta == 0)
          {
            if (cellArray.calculateItemAddition(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1000, FluidRegistry.LAVA.getID()))) == null)
            {
View Full Code Here

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

          } else if (offsetID == FluidRegistry.LAVA.getBlockID() && offsetMeta == 0)
          {
            if (cellArray.calculateItemAddition(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1000, FluidRegistry.LAVA.getID()))) == null)
            {
              worldObj.setBlockToAir(xCoord + orientation.offsetX, yCoord + orientation.offsetY, zCoord + orientation.offsetZ);
              cellArray.addItems(Util.createItemStack(new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1000, FluidRegistry.LAVA.getID())));
            }
          }
        } catch (Throwable wontHappen)
        {
          // Nothing
View Full Code Here

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

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

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

      return 0;
    IAEItemStack drained = cellArray.extractItems(createFluidItemStack(toDrain));
    if (drained == null)
      return 0;
    if (!doDrain)
      cellArray.addItems(drained);

    getGrid().useMEEnergy(drained.getStackSize() == 0 ? 0 : drained.getStackSize() / 4, "FluidInterface");
    return drained.getStackSize();
  }
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.