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 TypeMethodDescriptionbooleancanGenerateIn(net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.LevelStem> levelStemKey) Tries to determine whether this biome generates in a specific dimension, based on theWorldOptionsused by the current level.net.minecraft.world.level.biome.BiomegetBiome()Returns the biome with modifications by biome modifiers of higher priority already applied.net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.feature.ConfiguredFeature<?, ?>>> getFeatureKey(net.minecraft.world.level.levelgen.feature.ConfiguredFeature<?, ?> configuredFeature) Tries to retrieve the resource key for the given configured feature, which should be from this biomes current feature list.Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.placement.PlacedFeature>> getPlacedFeatureKey(net.minecraft.world.level.levelgen.placement.PlacedFeature placedFeature) Tries to retrieve the resource key for the given placed feature, which should be from this biomes current feature list.Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> getStructureKey(net.minecraft.world.level.levelgen.structure.Structure structureFeature) Tries to retrieve the resource key for the given configured feature, which should be from this biomes current structure list.default booleanhasFeature(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.feature.ConfiguredFeature<?, ?>> key) Returns true if this biome contains a placed feature referencing a configured feature with the given key.default booleanhasPlacedFeature(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.placement.PlacedFeature> key) Returns true if this biome contains a placed feature with the given key.booleanhasTag(net.minecraft.tags.TagKey<net.minecraft.world.level.biome.Biome> tag) Returns true if this biome is in the givenTagKey.booleanvalidForStructure(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure> key) Returns true if the configured structure with the given key can start in this biome in any chunk generator used by the current level.
-
Method Details
-
getBiomeKey
net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> getBiomeKey() -
getBiome
net.minecraft.world.level.biome.Biome getBiome()Returns the biome with modifications by biome modifiers of higher priority already applied. -
getBiomeHolder
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> getBiomeHolder() -
hasFeature
default boolean hasFeature(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.feature.ConfiguredFeature<?, ?>> key) Returns true if this biome contains a placed feature referencing a configured feature with the given key. -
hasPlacedFeature
default boolean hasPlacedFeature(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.placement.PlacedFeature> key) Returns true if this biome contains a placed feature with the given key. -
getFeatureKey
Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.feature.ConfiguredFeature<?,?>>> getFeatureKey(net.minecraft.world.level.levelgen.feature.ConfiguredFeature<?, ?> configuredFeature) Tries to retrieve the resource 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
Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.placement.PlacedFeature>> getPlacedFeatureKey(net.minecraft.world.level.levelgen.placement.PlacedFeature placedFeature) Tries to retrieve the resource 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
boolean validForStructure(net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure> key) Returns true if the configured structure with the given key can start in this biome in any chunk generator used by the current level. -
getStructureKey
Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.levelgen.structure.Structure>> getStructureKey(net.minecraft.world.level.levelgen.structure.Structure structureFeature) Tries to retrieve the resource 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
boolean canGenerateIn(net.minecraft.resources.ResourceKey<net.minecraft.world.level.dimension.LevelStem> levelStemKey) Tries to determine whether this biome generates in a specific dimension, based on theWorldOptionsused by the current level.If no level stem exists for the given level stem key,
falseis returned. -
hasTag
boolean hasTag(net.minecraft.tags.TagKey<net.minecraft.world.level.biome.Biome> tag) Returns true if this biome is in the givenTagKey..- Returns:
- true if this biome is in the given
TagKey
-