cleanup async world ticker

This commit is contained in:
Julian Krings
2026-01-01 16:34:33 +01:00
parent f9c062c794
commit d15f7d62d1

View File

@@ -128,10 +128,6 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
getEngine().getWorld().tryGetRealWorld(); getEngine().getWorld().tryGetRealWorld();
} }
if (!IrisSettings.get().getWorld().isMarkerEntitySpawningSystem() && !IrisSettings.get().getWorld().isAnbientEntitySpawningSystem()) {
return 3000;
}
if (getEngine().getWorld().hasRealWorld()) { if (getEngine().getWorld().hasRealWorld()) {
if (getEngine().getWorld().getPlayers().isEmpty()) { if (getEngine().getWorld().getPlayers().isEmpty()) {
return 5000; return 5000;
@@ -145,6 +141,13 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
discoverChunks(); discoverChunks();
} }
if (cln.flip()) {
engine.getEngineData().cleanup(getEngine());
}
if (!IrisSettings.get().getWorld().isMarkerEntitySpawningSystem() && !IrisSettings.get().getWorld().isAnbientEntitySpawningSystem()) {
return 3000;
}
if (getDimension().isInfiniteEnergy()) { if (getDimension().isInfiniteEnergy()) {
energy += 1000; energy += 1000;
@@ -156,10 +159,6 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
fixEnergy(); fixEnergy();
} }
if (cln.flip()) {
engine.getEngineData().cleanup(getEngine());
}
if (precount != null) { if (precount != null) {
entityCount = 0; entityCount = 0;
for (Entity i : precount) { for (Entity i : precount) {
@@ -187,7 +186,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
} }
}; };
looper.setPriority(Thread.MIN_PRIORITY); looper.setPriority(Thread.MIN_PRIORITY);
looper.setName("Iris World Manager"); looper.setName("Iris World Manager " + getTarget().getWorld().name());
looper.start(); looper.start();
} }