9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-28 11:39:07 +00:00

Mantle & Debugging

This commit is contained in:
Daniel Mills
2021-08-07 02:48:36 -04:00
parent 771cb45b49
commit 803dfed9f7
16 changed files with 675 additions and 42 deletions

View File

@@ -228,24 +228,10 @@ public class IrisEngine extends BlockPopulator implements Engine {
}
case ISLANDS -> {
getFramework().getTerrainActuator().actuate(x, z, vblocks, multicore);
}
}
getMetrics().getTotal().put(p.getMilliseconds());
if (IrisSettings.get().getGeneral().isDebug()) {
KList<String> v = new KList<>();
KMap<String, Double> g = getMetrics().pull();
for (String i : g.sortKNumber()) {
if (g.get(i) != null) {
v.add(C.RESET + "" + C.LIGHT_PURPLE + i + ": " + C.UNDERLINE + C.BLUE + Form.duration(g.get(i), 0) + C.RESET + C.GRAY + "");
}
}
Iris.debug(v.toString(", "));
}
} catch (Throwable e) {
Iris.reportError(e);
fail("Failed to generate " + x + ", " + z, e);
@@ -258,7 +244,9 @@ public class IrisEngine extends BlockPopulator implements Engine {
f.getParentFile().mkdirs();
try {
IO.writeAll(f, new Gson().toJson(getEngineData()));
Iris.debug("Saved Engine Data");
} catch (IOException e) {
Iris.error("Failed to save Engine Data");
e.printStackTrace();
}
}

View File

@@ -114,6 +114,7 @@ public class ParallaxWorld implements ParallaxAccess {
if (lr != null) {
v += lr.unload();
Iris.debug("Unloaded Parallax Region " + C.RED + x + " " + z);
}
}
@@ -128,6 +129,7 @@ public class ParallaxWorld implements ParallaxAccess {
ParallaxRegion v = new ParallaxRegion(burst, height, folder, x, z);
loadedRegions.put(key(x, z), v);
Iris.debug("Loaded Parallax Region " + C.RED + x + " " + z);
return v;
}