use of mcjty.rftools.blocks.screens.network.ScreenInfoPacketServer in project RFTools by McJty.
the class ScreenBlock method getWailaBodyScreen.
@SideOnly(Side.CLIENT)
@Optional.Method(modid = "waila")
public List<String> getWailaBodyScreen(List<String> currenttip, EntityPlayer player, ScreenTileEntity te) {
if (!te.isConnected() && te.isControllerNeeded()) {
currenttip.add(TextFormatting.YELLOW + "[NOT CONNECTED]");
}
if (!isCreative()) {
boolean power = te.isPowerOn();
if (!power) {
currenttip.add(TextFormatting.YELLOW + "[NO POWER]");
}
if (player.isSneaking()) {
int rfPerTick = te.getTotalRfPerTick();
currenttip.add(TextFormatting.GREEN + (power ? "Consuming " : "Needs ") + rfPerTick + " RF/tick");
}
}
if (System.currentTimeMillis() - lastTime > 500) {
lastTime = System.currentTimeMillis();
RFToolsMessages.INSTANCE.sendToServer(new PacketGetInfoFromServer(RFTools.MODID, new ScreenInfoPacketServer(te.getWorld().provider.getDimension(), te.getPos())));
}
Collections.addAll(currenttip, ScreenInfoPacketClient.infoReceived);
return currenttip;
}
Aggregations