World regeneration issue

Discussion in 'Plugin Development' started by masu7, Sep 28, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    masu7

    Do you guys know why when i'm trying to load a world some chunks are missing (see image) . I'm unloading the world using unloadWorld(world, false) then I'm copying and pasting the world folder to make the regeneration , After that i'm using this method to generate the world:

    Code:
                   
    WorldCreator worldCreator = new WorldCreator(worldName);
    worldCreator.seed(world.getSeed());
    worldCreator.generateStructures(false);
    worldCreator.generator(VOID_GENERATOR);
    World world = worldCreator.createWorld();
    world.setKeepSpawnInMemory(false);
    world.setSpawnFlags(true, false);
    world.setAutoSave(false);
    world.setTime(0L);
    Bukkit.getWorlds().add(world);
    This only happens on 1.13+

    [​IMG]
     
  2. It's just a guess but I had similar problems before and the issue was the unloading of the chunks. I solved it with looping over every chunk and unloading it before unloading the whole world. I tried a lot and when I found this solution I stopped changing it so it might be a completely wrong way to do it, but in the end it worked for me. Compare the original world file with the new one to see if the problems occur while loading or saving.
     
Thread Status:
Not open for further replies.

Share This Page