mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Stop hotloading production worlds
This commit is contained in:
parent
bac66dfbf9
commit
923a42e9a3
@ -93,7 +93,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
this.dimensionKey = dimensionKey;
|
||||
this.folder = new ReactiveFolder(dataLocation, (_a, _b, _c) -> hotload());
|
||||
setupEngine();
|
||||
this.hotloader = new Looper() {
|
||||
this.hotloader = studio ? new Looper() {
|
||||
@Override
|
||||
protected long loop() {
|
||||
if (hotloadChecker.flip()) {
|
||||
@ -102,11 +102,15 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
|
||||
return 250;
|
||||
}
|
||||
};
|
||||
} : null;
|
||||
|
||||
if(studio)
|
||||
{
|
||||
hotloader.setPriority(Thread.MIN_PRIORITY);
|
||||
hotloader.start();
|
||||
hotloader.setName(getTarget().getWorld().name() + " Hotloader");
|
||||
}
|
||||
}
|
||||
|
||||
private void setupEngine() {
|
||||
IrisData data = IrisData.get(dataLocation);
|
||||
@ -232,7 +236,11 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
@Override
|
||||
public void close() {
|
||||
withExclusiveControl(() -> {
|
||||
if(isStudio())
|
||||
{
|
||||
hotloader.interrupt();
|
||||
}
|
||||
|
||||
getEngine().close();
|
||||
});
|
||||
}
|
||||
@ -244,6 +252,11 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
||||
|
||||
@Override
|
||||
public void hotload() {
|
||||
if(!isStudio())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
withExclusiveControl(() -> getEngine().hotload());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user