Package crazypants.enderio.conduit.power

Examples of crazypants.enderio.conduit.power.PowerTracker


  }

  public static void sendInfoMessage(EntityPlayer player, IPowerConduit conduit) {
    PowerConduitNetwork pcn = (PowerConduitNetwork) conduit.getNetwork();
    NetworkPowerManager pm = pcn.getPowerManager();
    PowerTracker tracker = pm.getTracker(conduit);
    if(tracker != null) {
      sendPowerConduitInfo(player, conduit, tracker);
    } else {
      sendInfoMessage(player, pm);
    }
View Full Code Here


      player.addChatComponentMessage(new ChatComponentText(line));
    }   
  }

  public static void sendInfoMessage(EntityPlayer player, NetworkPowerManager pm) {
    PowerTracker tracker = pm.getNetworkPowerTracker();
    String color = "\u00A7a ";
    StringBuilder sb = new StringBuilder();
    sb.append(color);
    sb.append(NET_HEADING);
    player.addChatComponentMessage(new ChatComponentText(sb.toString()));

    color = "\u00A79 ";
    sb = new StringBuilder();
    sb.append(color);
    sb.append(CON_STORAGE);
    sb.append(PowerDisplayUtil.formatPower(pm.getPowerInConduits()));
    sb.append(OF);
    sb.append(PowerDisplayUtil.formatPower(pm.getMaxPowerInConduits()));
    sb.append(" ");
    sb.append(PowerDisplayUtil.abrevation());
    sb.append("\n");
    sb.append(CAP_BANK_STOR);
    sb.append(PowerDisplayUtil.formatPower(pm.getPowerInCapacitorBanks()));
    sb.append(OF);
    sb.append(PowerDisplayUtil.formatPower(pm.getMaxPowerInCapacitorBanks()));
    sb.append(" ");
    sb.append(PowerDisplayUtil.abrevation());
    sb.append("\n");
    sb.append(MACH_BUF_STOR);
    sb.append(PowerDisplayUtil.formatPower(pm.getPowerInReceptors()));
    sb.append(OF);
    sb.append(PowerDisplayUtil.formatPower(pm.getMaxPowerInReceptors()));
    sb.append(" ");
    sb.append(PowerDisplayUtil.abrevation());
    sb.append("\n");
    sb.append(AVE_OUT);
    sb.append(PowerDisplayUtil.formatPowerFloat(tracker.getAverageRfTickSent()));
    sb.append("\n");
    sb.append(AVE_IN);
    sb.append(PowerDisplayUtil.formatPowerFloat(tracker.getAverageRfTickRecieved()));
   
    String[] lines = sb.toString().split("\n");
    for(String line : lines) {
      player.addChatComponentMessage(new ChatComponentText(line));
    }     
View Full Code Here

    maxPowerInCoduits = pm.getMaxPowerInConduits();
    powerInCapBanks = pm.getPowerInCapacitorBanks();
    maxPowerInCapBanks = pm.getMaxPowerInCapacitorBanks();
    powerInMachines = pm.getPowerInReceptors();
    maxPowerInMachines = pm.getMaxPowerInReceptors();
    PowerTracker tracker = pm.getNetworkPowerTracker();
    aveRfSent = tracker.getAverageRfTickSent();
    aveRfRecieved = tracker.getAverageRfTickRecieved();
  }
View Full Code Here

TOP

Related Classes of crazypants.enderio.conduit.power.PowerTracker

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.