diff --git a/src/main/java/com/hbm/commands/CommandPacketInfo.java b/src/main/java/com/hbm/commands/CommandPacketInfo.java index d4d3cb0f3..dec1fbff7 100644 --- a/src/main/java/com/hbm/commands/CommandPacketInfo.java +++ b/src/main/java/com/hbm/commands/CommandPacketInfo.java @@ -58,7 +58,10 @@ public class CommandPacketInfo extends CommandBase { sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "Packet Info: ")); sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Amount total: " + totalCnt)); sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Amount remaining: " + PacketThreading.threadPool.getQueue().size())); - sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "% Remaining to process: " + BobMathUtil.roundDecimal(((double) PacketThreading.threadPool.getQueue().size() / totalCnt) * 100, 2) + "%")); + + if(totalCnt != 0) + sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "% Remaining to process: " + BobMathUtil.roundDecimal(((double) PacketThreading.threadPool.getQueue().size() / totalCnt) * 100, 2) + "%")); + sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Time spent waiting on thread(s) last tick: " + BobMathUtil.roundDecimal(PacketThreading.nanoTimeWaited / 1000000d, 4) + "ms")); } diff --git a/src/main/java/com/hbm/tileentity/TileEntityLoadedBase.java b/src/main/java/com/hbm/tileentity/TileEntityLoadedBase.java index c151824a9..6658452b7 100644 --- a/src/main/java/com/hbm/tileentity/TileEntityLoadedBase.java +++ b/src/main/java/com/hbm/tileentity/TileEntityLoadedBase.java @@ -80,7 +80,7 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile, IBu // In my testing, this can be reliably reproduced with a full fluid barrel, for instance. // I think it might be fixable by doing something with getDescriptionPacket() and onDataPacket(), // but this sidesteps the problem for the mean time. - if (preBuf.equals(lastPackedBuf) && this.worldObj.getWorldTime() % 20 == 0) { + if (preBuf.equals(lastPackedBuf) && this.worldObj.getWorldTime() % 20 != 0) { return; }