Engine std check fixes

This commit is contained in:
Daniel Mills 2021-08-08 08:00:09 -04:00
parent e4b45e512f
commit df05ade4a7
2 changed files with 21 additions and 9 deletions

View File

@ -79,6 +79,7 @@ public class IrisEngine extends BlockPopulator implements Engine {
private volatile int parallelism; private volatile int parallelism;
private final EngineMetrics metrics; private final EngineMetrics metrics;
private volatile int minHeight; private volatile int minHeight;
private final boolean studio;
private boolean failing; private boolean failing;
private boolean closed; private boolean closed;
private int cacheId; private int cacheId;
@ -101,7 +102,8 @@ public class IrisEngine extends BlockPopulator implements Engine {
private final AtomicBoolean cleaning; private final AtomicBoolean cleaning;
private final ChronoLatch cleanLatch; private final ChronoLatch cleanLatch;
public IrisEngine(EngineTarget target) { public IrisEngine(EngineTarget target, boolean studio) {
this.studio = studio;
wallClock = new AtomicRollingSequence(32); wallClock = new AtomicRollingSequence(32);
execution = new IrisExecutionEnvironment(this); execution = new IrisExecutionEnvironment(this);
// TODO: HEIGHT ------------------------------------------------------------------------------------------------------> // TODO: HEIGHT ------------------------------------------------------------------------------------------------------>
@ -164,6 +166,23 @@ public class IrisEngine extends BlockPopulator implements Engine {
}); });
} }
@Override
public int getGenerated() {
// TODO: IMPL
return 0;
}
@Override
public double getGeneratedPerSecond() {
// TODO: IMPL
return 0;
}
@Override
public boolean isStudio() {
return studio;
}
private void computeBiomeMaxes() { private void computeBiomeMaxes() {
for (IrisBiome i : getDimension().getAllBiomes(this)) { for (IrisBiome i : getDimension().getAllBiomes(this)) {
double density = 0; double density = 0;
@ -394,11 +413,4 @@ public class IrisEngine extends BlockPopulator implements Engine {
public int getCacheID() { public int getCacheID() {
return cacheId; return cacheId;
} }
@Override
public void hotload() {
Iris.callEvent(new IrisEngineHotloadEvent(this));
getEngineData().getStatistics().hotloaded();
cacheId = RNG.r.nextInt();
}
} }

View File

@ -60,7 +60,7 @@ public class HeadlessGenerator implements PlatformChunkGenerator {
this.world = world; this.world = world;
burst = new MultiBurst("Iris Headless Generator", 9, IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getPregenThreadCount())); burst = new MultiBurst("Iris Headless Generator", 9, IrisSettings.getThreadCount(IrisSettings.get().getConcurrency().getPregenThreadCount()));
writer = new NBTWorld(world.getWorld().worldFolder()); writer = new NBTWorld(world.getWorld().worldFolder());
engine = new IrisEngine(new EngineTarget(world.getWorld(),world.getDimension(), world.getDimension().getLoader())); engine = new IrisEngine(new EngineTarget(world.getWorld(),world.getDimension(), world.getDimension().getLoader()), isStudio());
} }
@ChunkCoordinates @ChunkCoordinates