mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
fix some stuff, also fix sending exactly 19x more packets than needed lmao
This commit is contained in:
parent
90cfd37a31
commit
88c1632481
@ -58,7 +58,10 @@ public class CommandPacketInfo extends CommandBase {
|
|||||||
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "Packet Info: "));
|
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.GOLD + "Packet Info: "));
|
||||||
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Amount total: " + totalCnt));
|
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 + "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"));
|
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Time spent waiting on thread(s) last tick: " + BobMathUtil.roundDecimal(PacketThreading.nanoTimeWaited / 1000000d, 4) + "ms"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.
|
// 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(),
|
// I think it might be fixable by doing something with getDescriptionPacket() and onDataPacket(),
|
||||||
// but this sidesteps the problem for the mean time.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user