mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
V+
This commit is contained in:
parent
6b4bd90bfa
commit
b5d7e2969f
@ -69,6 +69,7 @@ public class AsyncPregenMethod implements PregeneratorMethod {
|
||||
PaperLib.getChunkAtAsync(world, x, z, true).get();
|
||||
listener.onChunkGenerated(x, z);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
J.sleep(5);
|
||||
future.add(burst.complete(() -> completeChunk(x, z, listener)));
|
||||
}
|
||||
|
@ -46,10 +46,11 @@ public class IrisEngineEffects extends EngineAssignedComponent implements Engine
|
||||
public void updatePlayerMap() {
|
||||
List<Player> pr = getEngine().getWorld().getPlayers();
|
||||
|
||||
if (pr == null) return; //Fix for paper returning a world with a null playerlist
|
||||
if (pr == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (Player i : pr) {
|
||||
Location l = i.getLocation();
|
||||
boolean pcc = players.containsKey(i.getUniqueId());
|
||||
if (!pcc) {
|
||||
players.put(i.getUniqueId(), new EnginePlayer(getEngine(), i));
|
||||
|
@ -67,6 +67,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
private double energy = 25;
|
||||
private int entityCount = 0;
|
||||
private final ChronoLatch cl;
|
||||
private final ChronoLatch clw;
|
||||
private final ChronoLatch ecl;
|
||||
private final ChronoLatch cln;
|
||||
private final ChronoLatch chunkUpdater;
|
||||
@ -80,6 +81,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
cl = null;
|
||||
ecl = null;
|
||||
cln = null;
|
||||
clw = null;
|
||||
chunkCooldowns = null;
|
||||
looper = null;
|
||||
chunkUpdater = null;
|
||||
@ -92,6 +94,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
cln = new ChronoLatch(60000);
|
||||
cl = new ChronoLatch(3000);
|
||||
ecl = new ChronoLatch(250);
|
||||
clw = new ChronoLatch(1000, true);
|
||||
chunkCooldowns = new KMap<>();
|
||||
id = engine.getCacheID();
|
||||
energy = 25;
|
||||
@ -102,6 +105,11 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
interrupt();
|
||||
}
|
||||
|
||||
if(!getEngine().getWorld().hasRealWorld() && clw.flip())
|
||||
{
|
||||
getEngine().getWorld().tryGetRealWorld();
|
||||
}
|
||||
|
||||
if (getEngine().getWorld().hasRealWorld()) {
|
||||
if (chunkUpdater.flip()) {
|
||||
updateChunks();
|
||||
|
Loading…
x
Reference in New Issue
Block a user