Examples of IEssentiaTransport


Examples of thaumcraft.api.aspects.IEssentiaTransport

  int drawEssentia() {
    ForgeDirection orientation = getOrientation();
    TileEntity te = ThaumcraftApiHelper.getConnectableTile(worldObj, xCoord, yCoord, zCoord, orientation);
    if (te != null) {
      IEssentiaTransport ic = (IEssentiaTransport) te;
      if (!ic.canOutputTo(orientation.getOpposite()))
        return 0;

      for (Aspect aspect : repairValues.keySet())
        if (ic.getSuctionType(orientation.getOpposite()) == aspect && ic.getSuctionAmount(orientation.getOpposite()) < getSuctionAmount(orientation) && ic.takeEssentia(aspect, 1, orientation.getOpposite()) == 1)
          return repairValues.get(aspect);
    }
    return 0;
  }
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.