forked from xjboss/KCauldronX
Some improvements in spigot timings and fix #179
This commit is contained in:
@ -12,6 +12,7 @@ import kcauldron.updater.KCauldronUpdater;
|
||||
import kcauldron.updater.KVersionRetriever;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.server.command.ForgeCommand;
|
||||
|
||||
public class KCauldronCommand extends Command {
|
||||
@ -92,8 +93,8 @@ public class KCauldronCommand extends Command {
|
||||
double worldTPS = Math.min(1000.0 / worldTickTime, 20);
|
||||
|
||||
sender.sendMessage(String.format("%s[%d] %s%s %s- %s%.2fms / %.2ftps", ChatColor.GOLD, dimensionId,
|
||||
current ? ChatColor.GREEN : ChatColor.YELLOW, displayName, ChatColor.RESET, ChatColor.DARK_RED, worldTickTime,
|
||||
worldTPS));
|
||||
current ? ChatColor.GREEN : ChatColor.YELLOW, displayName, ChatColor.RESET, ChatColor.DARK_RED, worldTickTime,
|
||||
worldTPS));
|
||||
}
|
||||
}
|
||||
double meanTickTime = mean(server.tickTimeArray) * 1.0E-6D;
|
||||
|
@ -136,6 +136,9 @@ public class SpigotTimings {
|
||||
public final CustomTimingsHandler tracker;
|
||||
public final CustomTimingsHandler doTick;
|
||||
public final CustomTimingsHandler tickEntities;
|
||||
public final CustomTimingsHandler weatherUpdate;
|
||||
public final CustomTimingsHandler cleanupCache;
|
||||
public final CustomTimingsHandler fullTick;
|
||||
|
||||
public final CustomTimingsHandler syncChunkLoadTimer;
|
||||
public final CustomTimingsHandler syncChunkLoadDataTimer;
|
||||
@ -173,6 +176,9 @@ public class SpigotTimings {
|
||||
tracker = new CustomTimingsHandler(name + "tracker");
|
||||
doTick = new CustomTimingsHandler(name + "doTick");
|
||||
tickEntities = new CustomTimingsHandler(name + "tickEntities");
|
||||
weatherUpdate = new CustomTimingsHandler(name + "weatherUpdate");
|
||||
cleanupCache = new CustomTimingsHandler(name + "cleanupCache");
|
||||
fullTick = new CustomTimingsHandler(name + "fullTick");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user