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

Please don't break or leak again.

This commit is contained in:
Vatuu
2022-05-27 01:54:21 +02:00
parent ec74037f05
commit a1fbf25465

View File

@@ -79,7 +79,7 @@ import java.util.stream.Stream;
public class IrisWorldManager extends EngineAssignedWorldManager {
private final Looper looper;
private final int id;
private final KMap<Long, Long> chunkCooldowns;
//private final KMap<Long, Long> chunkCooldowns;
private final KList<Runnable> updateQueue = new KList<>();
private final ChronoLatch cl;
private final ChronoLatch clw;
@@ -99,7 +99,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
ecl = null;
cln = null;
clw = null;
chunkCooldowns = null;
//chunkCooldowns = null;
looper = null;
chunkUpdater = null;
id = -1;
@@ -112,7 +112,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
cl = new ChronoLatch(3000);
ecl = new ChronoLatch(250);
clw = new ChronoLatch(1000, true);
chunkCooldowns = new KMap<>();
//chunkCooldowns = new KMap<>();
id = engine.getCacheID();
energy = 25;
looper = new Looper() {
@@ -255,13 +255,13 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
}
}
int chunkCooldownSeconds = 60;
/*int chunkCooldownSeconds = 60;
for(Long i : chunkCooldowns.k()) {
if(M.ms() - chunkCooldowns.get(i) > TimeUnit.SECONDS.toMillis(chunkCooldownSeconds)) {
chunkCooldowns.remove(i);
}
}
}*/
int spawnBuffer = RNG.r.i(2, 12);
@@ -279,7 +279,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
}
spawnIn(c, false);
chunkCooldowns.put(Cache.key(c), M.ms());
//chunkCooldowns.put(Cache.key(c), M.ms());
}
energy -= (actuallySpawned / 2D);