Package net.fabricmc.fabric.api.biome.v1
Interface BiomeSelectionContext
public interface BiomeSelectionContext
Context given to a biome selector for deciding whether it applies to a biome or not.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canGenerateIn
(RegistryKey<DimensionOptions> dimensionKey) Tries to determine whether this biome generates in a specific dimension, based on theGeneratorOptions
used by the current world-save.getBiome()
Returns the biome with modifications by biome modifiers of higher priority already applied.Optional
<RegistryKey<ConfiguredFeature<?, ?>>> getFeatureKey
(ConfiguredFeature<?, ?> configuredFeature) Tries to retrieve the registry key for the given configured feature, which should be from this biomes current feature list.getPlacedFeatureKey
(PlacedFeature placedFeature) Tries to retrieve the registry key for the given placed feature, which should be from this biomes current feature list.getStructureKey
(Structure structureFeature) Tries to retrieve the registry key for the given configured feature, which should be from this biomes current structure list.default boolean
hasFeature
(RegistryKey<ConfiguredFeature<?, ?>> key) Returns true if this biome contains a placed feature referencing a configured feature with the given key.default boolean
Returns true if this biome contains a placed feature with the given key.boolean
Returns true if this biome is in the givenTagKey
.boolean
Returns true if the configured structure with the given key can start in this biome in any chunk generator used by the current world-save.
-
Method Details
-
getBiomeKey
RegistryKey<Biome> getBiomeKey() -
getBiome
Biome getBiome()Returns the biome with modifications by biome modifiers of higher priority already applied. -
getBiomeRegistryEntry
RegistryEntry<Biome> getBiomeRegistryEntry() -
hasFeature
Returns true if this biome contains a placed feature referencing a configured feature with the given key. -
hasPlacedFeature
Returns true if this biome contains a placed feature with the given key. -
getFeatureKey
Optional<RegistryKey<ConfiguredFeature<?,?>>> getFeatureKey(ConfiguredFeature<?, ?> configuredFeature) Tries to retrieve the registry key for the given configured feature, which should be from this biomes current feature list. May be empty if the configured feature is not registered, or does not come from this biomes feature list. -
getPlacedFeatureKey
Tries to retrieve the registry key for the given placed feature, which should be from this biomes current feature list. May be empty if the placed feature is not registered, or does not come from this biomes feature list. -
validForStructure
Returns true if the configured structure with the given key can start in this biome in any chunk generator used by the current world-save. -
getStructureKey
Tries to retrieve the registry key for the given configured feature, which should be from this biomes current structure list. May be empty if the configured feature is not registered, or does not come from this biomes feature list. -
canGenerateIn
Tries to determine whether this biome generates in a specific dimension, based on theGeneratorOptions
used by the current world-save.If no dimension options exist for the given dimension key,
false
is returned. -
hasTag
Returns true if this biome is in the givenTagKey
..- Returns:
- true if this biome is in the given
TagKey
-