Class StepsBiomeProvider
java.lang.Object
org.bukkit.generator.BiomeProvider
dev.wyck.misc.providers.WyckBiomeProvider
dev.wyck.misc.providers.StepsBiomeProvider
A biome provider that uses a series of steps to determine the biome at a given position based on context.
Usage:
StepsBiomeProvider provider = StepsBiomeProvider.steps()
.step((worldInfo, x, y, z) -> {
if (y > 200) return volcanoBiome;
if (worldInfo.getEnvironment() == World.Environment.NETHER) return ashBiome;
return null; // defer to next step
}, volcanoBiome, ashBiome)
.step(oceanBiome, (worldInfo, x, y, z) -> y < 40) // convenience form, auto-registered
.fallback(plainsBiome)
.build();
- Since:
- 2.3.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA position test for the conveniencestep(biome, condition)overload.static interfaceA step that inspects the position and optionally produces a biome.static final classA builder class for creating instances of StepsBiomeProvider. -
Field Summary
Fields inherited from class WyckBiomeProvider
biomeMap -
Method Summary
Methods inherited from class WyckBiomeProvider
getBiomeMap, getBiomesMethods inherited from class BiomeProvider
getBiome
-
Method Details
-
getBiome
- Specified by:
getBiomein classBiomeProvider
-
builder
-