Examples of IPowerInterface


Examples of crazypants.enderio.power.IPowerInterface

      if(!receptors.isEmpty() && !receptorIterator.hasNext()) {
        receptorIterator = receptors.listIterator();
      }
      ReceptorEntry r = receptorIterator.next();
      IPowerInterface pp = r.powerInterface;
      if(pp != null) {       
        int canOffer = Math.min(r.emmiter.getMaxEnergyExtracted(r.direction), available);
        int used = pp.recieveEnergy(r.direction.getOpposite(), canOffer);
        trackerSend(r.emmiter, used, false);
        available -= used;
        if(available <= 0) {
          break;
        }
View Full Code Here

Examples of crazypants.enderio.power.IPowerInterface

  @Override
  public void addConduit(IPowerConduit con) {
    super.addConduit(con);
    Set<ForgeDirection> externalDirs = con.getExternalConnections();
    for (ForgeDirection dir : externalDirs) {
      IPowerInterface pr = con.getExternalPowerReceptor(dir);
      if(pr != null) {
        TileEntity te = con.getBundle().getEntity();
        powerReceptorAdded(con, dir, te.xCoord + dir.offsetX, te.yCoord + dir.offsetY, te.zCoord + dir.offsetZ, pr);
      }
    }
View Full Code Here

Examples of crazypants.enderio.power.IPowerInterface

    return true;
  }

  @Override
  public boolean canConnectToExternal(ForgeDirection direction, boolean ignoreDisabled) {
    IPowerInterface rec = getExternalPowerReceptor(direction);
   
    return rec != null && rec.canConduitConnect(direction);
  }
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.