Change location of seed world data.

Fixes #2087
This commit is contained in:
tastybento 2023-02-05 14:11:59 -08:00
parent 2d8b3074a9
commit f29e78557a
2 changed files with 2 additions and 3 deletions

View File

@ -350,7 +350,7 @@ public class AddonsManager {
private void seedWorld(GameModeAddon gameMode, @NonNull World world) {
// Use the Flat type of world because this is a copy and no vanilla creation is required
WorldCreator wc = WorldCreator.name("seeds/" + world.getName()).type(WorldType.FLAT).environment(world.getEnvironment());
WorldCreator wc = WorldCreator.name(world.getName() + "/bentobox").type(WorldType.FLAT).environment(world.getEnvironment());
World w = gameMode.getWorldSettings().isUseOwnGenerator() ? wc.createWorld() : wc.generator(world.getGenerator()).createWorld();
w.setDifficulty(Difficulty.PEACEFUL);
}

View File

@ -42,7 +42,6 @@ import world.bentobox.bentobox.database.objects.IslandDeletion;
*
*/
public abstract class CopyWorldRegenerator implements WorldRegenerator {
private static final String SEEDS = "seeds/";
private final BentoBox plugin;
protected CopyWorldRegenerator() {
@ -133,7 +132,7 @@ public abstract class CopyWorldRegenerator implements WorldRegenerator {
}
private CompletableFuture<Chunk> getSeedWorldChunk(World world, int chunkX, int chunkZ) {
World seed = Bukkit.getWorld(SEEDS + world.getName());
World seed = Bukkit.getWorld(world.getName() + "/bentobox");
if (seed == null) return CompletableFuture.completedFuture(null);
return PaperLib.getChunkAtAsync(seed, chunkX, chunkZ);
}