mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Add basic preloading (#1221)
This commit is contained in:
@ -58,6 +58,7 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
private boolean listeningImages;
|
||||
private final boolean chunksStretched;
|
||||
private final FAWEPlatformAdapterImpl platformAdapter;
|
||||
private Preloader preloader;
|
||||
|
||||
public FaweBukkit(Plugin plugin) {
|
||||
this.plugin = plugin;
|
||||
@ -277,9 +278,12 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Preloader getPreloader() {
|
||||
public Preloader getPreloader(boolean initialise) {
|
||||
if (PaperLib.isPaper()) {
|
||||
return new AsyncPreloader();
|
||||
if (preloader == null && initialise) {
|
||||
return preloader = new AsyncPreloader();
|
||||
}
|
||||
return preloader;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ public class FaweDelegateRegionManager {
|
||||
.autoQueue(false)
|
||||
.build();
|
||||
FlatRegionFunction replace = new BiomeReplace(editSession, biome);
|
||||
FlatRegionVisitor visitor = new FlatRegionVisitor(region, replace);
|
||||
FlatRegionVisitor visitor = new FlatRegionVisitor(region, replace, editSession);
|
||||
try {
|
||||
Operations.completeLegacy(visitor);
|
||||
editSession.flushQueue();
|
||||
|
Reference in New Issue
Block a user