Biome Registry
The BiomeRegistry is the main API for registering and modifying biomes in the Minecraft registry.
It provides methods for adding new biomes as well as modifying existing ones.
Biomes can be registered with this interface at any point, except the bootstrap phase.
Generally, biomes are registered and modified using the shorthand methods on the CustomBiome class,
but you can also use the BiomeRegistry directly if you need more control over the registration process.
Example Usage
Section titled “Example Usage”import dev.wyck.model.biome.CustomBiome;
import dev.wyck.keys.ResourceKey;
import dev.wyck.wrapper.BiomeSettings;
import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin {
@Override
public void onEnable() {
CustomBiome customBiome = CustomBiome.builder()
.resourceKey(ResourceKey.of("test", "custombiome"))
.settings(BiomeSettings.defaultSettings())
.waterColor("#F5F2EB")
.register(); // Shorthand — builds and registers the biome
}
} import dev.wyck.model.biome.CustomBiome;
import dev.wyck.registry.BiomeRegistry;
import dev.wyck.keys.ResourceKey;
import dev.wyck.wrapper.BiomeSettings;
import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin {
@Override
public void onEnable() {
CustomBiome customBiome = CustomBiome.builder()
.resourceKey(ResourceKey.of("test", "custombiome"))
.settings(BiomeSettings.defaultSettings())
.waterColor("#F5F2EB")
.build();
BiomeRegistry registry = BiomeRegistry.registry();
registry.register(customBiome);
}
} Modifying Biomes
Section titled “Modifying Biomes”Wyck supports modifying existing biomes after they’ve been registered. This means that you can change the visuals and gameplay elements of your biome on the fly.
- See documentation on this here.