Skip to content

Commit

Permalink
update some strings and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
way2muchnoise committed Jan 14, 2018
1 parent ef630e3 commit b1ba167
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/main/java/jeresources/profiling/Profiler.java
Expand Up @@ -35,7 +35,8 @@ private Profiler(ICommandSender sender, int chunkCount, boolean allWorlds) {
public void run() {
LogHelper.warn("There will be messages about world gen lag during the profiling, you can ignore these as that is what you get when profiling.");
if (!allWorlds) {


// Will never be null as the mod is client side only
Entity sendEnt = sender.getCommandSenderEntity();
int dimId = sendEnt.dimension;
profileWorld(dimId);
Expand All @@ -45,9 +46,8 @@ public void run() {
//getStaticDimensionIDs gets ALL of the dimensions.
//Forge says it is internal, but there are not other options for
//all dimensions that exist.
Integer[] dimIds = DimensionManager.getStaticDimensionIDs();
for (int i = 0; i < dimIds.length; i++) {
profileWorld(dimIds[i]);
for (Integer dimId : DimensionManager.getStaticDimensionIDs()) {
profileWorld(dimId);
}
}

Expand All @@ -68,7 +68,7 @@ private void profileWorld(int dimId) {
}

if (world == null) {
msg = "Unable to profile dimension ID " + dimId + ". There is no world for it.";
msg = "Unable to profile dimension " + dimId + ". There is no world for it.";
LogHelper.error(msg);
sender.sendMessage(new TextComponentString(msg));
return;
Expand All @@ -77,12 +77,10 @@ private void profileWorld(int dimId) {
//Make this stick for recovery after profiling.
final WorldServer worldServer = world;

msg = "Inspecting dimension "
+ worldServer.provider.getDimensionType().getName() + ": "
+ dimId + ". ";
msg = "Inspecting dimension " + dimId + ": " + worldServer.provider.getDimensionType().getName() + ". ";
sender.sendMessage(new TextComponentString(msg));

msg += "The world thinks it is dimension ID " + worldServer.provider.getDimension() + ".";
msg += "The world thinks it is dimension " + worldServer.provider.getDimension() + ".";
LogHelper.info(msg);


Expand Down

0 comments on commit b1ba167

Please sign in to comment.