mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 14:50:57 +00:00
Please don't break or leak again.
This commit is contained in:
@@ -79,7 +79,7 @@ import java.util.stream.Stream;
|
|||||||
public class IrisWorldManager extends EngineAssignedWorldManager {
|
public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||||
private final Looper looper;
|
private final Looper looper;
|
||||||
private final int id;
|
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 KList<Runnable> updateQueue = new KList<>();
|
||||||
private final ChronoLatch cl;
|
private final ChronoLatch cl;
|
||||||
private final ChronoLatch clw;
|
private final ChronoLatch clw;
|
||||||
@@ -99,7 +99,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
ecl = null;
|
ecl = null;
|
||||||
cln = null;
|
cln = null;
|
||||||
clw = null;
|
clw = null;
|
||||||
chunkCooldowns = null;
|
//chunkCooldowns = null;
|
||||||
looper = null;
|
looper = null;
|
||||||
chunkUpdater = null;
|
chunkUpdater = null;
|
||||||
id = -1;
|
id = -1;
|
||||||
@@ -112,7 +112,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
cl = new ChronoLatch(3000);
|
cl = new ChronoLatch(3000);
|
||||||
ecl = new ChronoLatch(250);
|
ecl = new ChronoLatch(250);
|
||||||
clw = new ChronoLatch(1000, true);
|
clw = new ChronoLatch(1000, true);
|
||||||
chunkCooldowns = new KMap<>();
|
//chunkCooldowns = new KMap<>();
|
||||||
id = engine.getCacheID();
|
id = engine.getCacheID();
|
||||||
energy = 25;
|
energy = 25;
|
||||||
looper = new Looper() {
|
looper = new Looper() {
|
||||||
@@ -255,13 +255,13 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int chunkCooldownSeconds = 60;
|
/*int chunkCooldownSeconds = 60;
|
||||||
|
|
||||||
for(Long i : chunkCooldowns.k()) {
|
for(Long i : chunkCooldowns.k()) {
|
||||||
if(M.ms() - chunkCooldowns.get(i) > TimeUnit.SECONDS.toMillis(chunkCooldownSeconds)) {
|
if(M.ms() - chunkCooldowns.get(i) > TimeUnit.SECONDS.toMillis(chunkCooldownSeconds)) {
|
||||||
chunkCooldowns.remove(i);
|
chunkCooldowns.remove(i);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
int spawnBuffer = RNG.r.i(2, 12);
|
int spawnBuffer = RNG.r.i(2, 12);
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
spawnIn(c, false);
|
spawnIn(c, false);
|
||||||
chunkCooldowns.put(Cache.key(c), M.ms());
|
//chunkCooldowns.put(Cache.key(c), M.ms());
|
||||||
}
|
}
|
||||||
|
|
||||||
energy -= (actuallySpawned / 2D);
|
energy -= (actuallySpawned / 2D);
|
||||||
|
|||||||
Reference in New Issue
Block a user