Tutorial Creating empty (void) worlds in 1.13+

Discussion in 'Resources' started by robertlit, Oct 19, 2019.

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

    robertlit

    So I was looking for a way to generate void worlds in version 1.13 and above, I found some threads about the subject but they were mostly unclear, eventually I found a way (it was mentioned in one of the threads but was not really well explained) and I thought I should share it, hope it helps!

    Step 1:
    Creating a new chunk generator class that will extend the default ChunkGenerator class and will override the method that returns the chunk data.
    Code:
    import java.util.Random;
    
    import javax.annotation.Nonnull;
    
    import org.bukkit.World;
    import org.bukkit.generator.ChunkGenerator;
    
    public class EmptyChunkGenerator extends ChunkGenerator {
    
        @Override
        @Nonnull
        public ChunkData generateChunkData(@Nonnull World world, @Nonnull Random random, int x, int z, @Nonnull BiomeGrid biome) {
            return createChunkData(world);
        }
    }

    Step 2:
    Generating a world using the chunk generator that we created in step 1.
    Code:
    WorldCreator wc = new WorldCreator("WORLD NAME HERE");
            wc.generator(new EmptyChunkGenerator()); //The chunk generator from step 1
            wc.createWorld();
    Hope this helped you :D
     
    Legendary_zotar and MCMastery like this.
  2. Offline

    hammers

    Thanks for the tutorial walmart one robertlit. Been looking for these from a long time. Thanks again
     
    Last edited: Aug 12, 2020
Thread Status:
Not open for further replies.

Share This Page