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.
registry(): Creates a new instance of the BiomeRegistry.register(CustomBiome): Registers a custom biome to the Minecraft registry.modify(CustomBiome): Modifies an existing biome in the Minecraft registry.
Example Usage
Section titled “Example Usage”import me.outspending.biomesapi.biome.CustomBiome;
import me.outspending.biomesapi.registry.ResourceKey;
import me.outspending.biomesapi.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 me.outspending.biomesapi.biome.CustomBiome;
import me.outspending.biomesapi.registry.BiomeRegistry;
import me.outspending.biomesapi.registry.ResourceKey;
import me.outspending.biomesapi.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”BiomesAPI 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.