This commit is contained in:
Daniel Mills 2021-08-08 01:12:16 -04:00
parent 2d43014029
commit 7f6fec5530
2 changed files with 20 additions and 2 deletions

View File

@ -87,6 +87,11 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
looper = new Looper() {
@Override
protected long loop() {
if(getEngine().isClosed())
{
interrupt();
}
if(getDimension().isInfiniteEnergy())
{
energy += 1000;
@ -133,6 +138,11 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
}
private boolean onAsyncTick() {
if(getEngine().isClosed())
{
return false;
}
actuallySpawned = 0;
if (energy < 100) {
@ -154,9 +164,17 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
}
if (cl.flip()) {
try
{
J.s(() -> precount = getEngine().getWorld().realWorld().getEntities());
}
catch(Throwable e)
{
close();
}
}
int chunkCooldownSeconds = 60;
for (Long i : chunkCooldowns.k()) {