Package net.minecraftforge.common

Examples of net.minecraftforge.common.ForgeDirection


    for (int j = 0; j < nbtItems.tagCount(); ++j) {
      try {
        NBTTagCompound nbtTreeMap = (NBTTagCompound) nbtItems.tagAt(j);

        ForgeDirection orientation = ForgeDirection.values()[nbtTreeMap.getInteger("orientation")];

        if (!receivedStacks.containsKey(orientation))
          receivedStacks.put(orientation, new PipeItemsCompactorInventory());

        NBTTagCompound nbtItemStacks = (NBTTagCompound) nbtTreeMap.getTag("itemStacks");
View Full Code Here


  }

  @Override
  public void doWork(PowerHandler workProvider) {
    if (workProvider.useEnergy(powerToBreakABlock, powerToBreakABlock, true) == powerToBreakABlock) {
      ForgeDirection o = getOpenOrientation();

      if (o != ForgeDirection.UNKNOWN) {
        Position p = new Position(container.xCoord, container.yCoord, container.zCoord, o);
        p.moveForwards(1.0);

        List<ItemStack> stacks = BlockUtil.getItemStackFromBlock(container.worldObj, (int) p.x, (int) p.y, (int) p.z);

        if (stacks != null) {
          for (ItemStack s : stacks) {
            if (s != null) {
              this.container.injectItem(s, true, o.getOpposite());
            }
          }
        }

        container.worldObj.setBlockToAir((int) p.x, (int) p.y, (int) p.z);
View Full Code Here

TOP

Related Classes of net.minecraftforge.common.ForgeDirection

Copyright © 2018 www.massapicom. 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.