🌐World generation

Since 1.0.0

Before we start here, don't expect fancy world generation features, this currently designed mostly for minigames which require simple empty worlds. However, the MCPlugin class does include some shortcuts to create worlds, those are very simple to use, so this guide will only provide examples that actually use MCUtils features for now.

VoidGenerator

As the name implies, this is a ChunkGenerator that can be used to create empty void worlds. Here is how you can use it with the shortcut method added to MCPlugin.

import net.codersky.mcutils.worldgen.VoidGenerator;

// Assuming this is your onEnable method on your MCPlugin class.
public void onEnable() {
    createWorld("name", new VoidGenerator());
}

That's pretty simple, but now, what about the biomes of the world? Well, that's easy too if you only want one biome.

SingleBiomeProvider

The SingleBiomeProvider class is a very simple BiomeProvider that will make your world only have one biome, it requires a Biome to be specified on its constructor. Knowing that, let's create a void world that will only have the plains biome.

import net.codersky.mcutils.worldgen.SingleBiomeProvider;

// Assuming this is your onEnable method on your MCPlugin class.
public void onEnable() {
    createWorld("name", new VoidGenerator(), new SingleBiomeProvider(Biome.PLAINS);
}

Last updated