mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
#690 Formatting of chat when right-clicking a conduit collar
This commit is contained in:
1 parent
ab09d52998
commit
bcd1eff405
2 files changed
+20
-14
No files matched your search
@@ -164,7 +164,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
|
||||
if(inv.hasTarget(con, dir)) {
|
||||
ItemFilter f = inv.con.getInputFilter(inv.conDir);
|
||||
if(input == null || f == null || f.doesItemPassFilter(input)) {
|
||||
result.add(Lang.localize(inv.inv.getInventoryName(), false));
|
||||
result.add(Lang.localize(inv.inv.getInventoryName(), false) + " " + inv.location);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,20 +197,13 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
|
||||
}
|
||||
|
||||
private void doTick(long tick) {
|
||||
// long start = System.nanoTime();
|
||||
|
||||
for (NetworkedInventory ni : inventories) {
|
||||
if(requiresSort) {
|
||||
ni.updateInsertOrder();
|
||||
}
|
||||
ni.onTick(tick);
|
||||
}
|
||||
|
||||
// if(requiresSort) {
|
||||
// long took = System.nanoTime() - start;
|
||||
// double secs = took / 1000000000.0;
|
||||
// System.out.println("Sortinging item network: took " + took + " nano " + secs + " secs, " + (secs * 1000) + " millis");
|
||||
// }
|
||||
|
||||
requiresSort = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -264,8 +264,10 @@ public class PacketConduitProbe implements IPacketEio {
|
||||
|
||||
}
|
||||
}
|
||||
player.addChatComponentMessage(new ChatComponentText(sb.toString()));
|
||||
|
||||
String[] lines = sb.toString().split("\n");
|
||||
for(String line : lines) {
|
||||
player.addChatComponentMessage(new ChatComponentText(line));
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendInfoMessage(EntityPlayer player, NetworkPowerManager pm) {
|
||||
@@ -305,7 +307,11 @@ public class PacketConduitProbe implements IPacketEio {
|
||||
sb.append("\n");
|
||||
sb.append(AVE_IN);
|
||||
sb.append(PowerDisplayUtil.formatPowerFloat(tracker.getAverageMjTickRecieved()));
|
||||
player.addChatComponentMessage(new ChatComponentText(sb.toString()));
|
||||
|
||||
String[] lines = sb.toString().split("\n");
|
||||
for(String line : lines) {
|
||||
player.addChatComponentMessage(new ChatComponentText(line));
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendPowerConduitInfo(EntityPlayer player, IPowerConduit con, PowerTracker tracker) {
|
||||
@@ -330,7 +336,11 @@ public class PacketConduitProbe implements IPacketEio {
|
||||
sb.append("\n");
|
||||
sb.append(AVE_IN);
|
||||
sb.append(PowerDisplayUtil.formatPowerFloat(tracker.getAverageMjTickRecieved()));
|
||||
player.addChatComponentMessage(new ChatComponentText(sb.toString()));
|
||||
|
||||
String[] lines = sb.toString().split("\n");
|
||||
for(String line : lines) {
|
||||
player.addChatComponentMessage(new ChatComponentText(line));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -365,7 +375,10 @@ public class PacketConduitProbe implements IPacketEio {
|
||||
sb.append(" ");
|
||||
sb.append(PowerDisplayUtil.abrevation());
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText(sb.toString()));
|
||||
String[] lines = sb.toString().split("\n");
|
||||
for(String line : lines) {
|
||||
player.addChatComponentMessage(new ChatComponentText(line));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user