Hotloader improvements

This commit is contained in:
Daniel Mills 2021-07-31 22:44:46 -04:00
parent 6b97acdb50
commit 668d29a9d7
2 changed files with 8 additions and 2 deletions

View File

@ -59,7 +59,7 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
super(engine); super(engine);
spawnCooldowns = new KMap<>(); spawnCooldowns = new KMap<>();
spawnable = true; spawnable = true;
art = J.ar(this::onAsyncTick, 20); art = J.ar(this::onAsyncTick, 7);
} }
private void onAsyncTick() { private void onAsyncTick() {

View File

@ -87,6 +87,7 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
private double generatedPerSecond = 0; private double generatedPerSecond = 0;
private final int art; private final int art;
private ReactiveFolder hotloader = null; private ReactiveFolder hotloader = null;
private IrisWorld cworld = null;
public EngineCompositeGenerator() { public EngineCompositeGenerator() {
this(null, true); this(null, true);
@ -131,6 +132,11 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
getComposite().close(); getComposite().close();
initialized.lazySet(false); initialized.lazySet(false);
if(cworld != null)
{
initialize(cworld);
}
} }
} }
@ -315,7 +321,7 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
populators.clear(); populators.clear();
populators.addAll(compound.get().getPopulators()); populators.addAll(compound.get().getPopulators());
hotloader = new ReactiveFolder(data.getDataFolder(), (a, c, d) -> hotload()); hotloader = new ReactiveFolder(data.getDataFolder(), (a, c, d) -> hotload());
cworld = world;
// if(world.hasRealWorld()) // if(world.hasRealWorld())
// { // {
// placeStrongholds(world.realWorld()); // placeStrongholds(world.realWorld());