More Readable Logs with CNPC Level

This commit is contained in:
KAMKEEL committed 2022-11-05 21:30:06 -04:00
1 parent d30d9ca701
commit 7692c1b628
3 files changed
+25 -10

No files matched your search

@@ -137,7 +137,11 @@ public class DataScript implements IScriptHandler {
script.engine.put(obs[i].toString(), ob);
}
if(CustomNpcs.ScriptLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.postScriptLog(npc.field_110179_h, type, String.format("[%s] NPC %s (%s, %s, %s) | Objects: %s", ((String)type.function).toUpperCase(), npc.display.name, (int)npc.posX, (int)npc.posY, (int)npc.posZ, Arrays.toString(obs)));
if(obs.length > 1 && obs[1] == null){
LogWriter.postScriptLog(npc.field_110179_h, type, String.format("[%s] NPC %s (%s, %s, %s)", ((String)type.function).toUpperCase(), npc.display.name, (int)npc.posX, (int)npc.posY, (int)npc.posZ));
} else {
LogWriter.postScriptLog(npc.field_110179_h, type, String.format("[%s] NPC %s (%s, %s, %s) | Objects: %s", ((String)type.function).toUpperCase(), npc.display.name, (int)npc.posX, (int)npc.posY, (int)npc.posZ, Arrays.toString(obs)));
}
}
return callScript(script, event);
}