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 Type
    Method
    Description
    boolean
    canGenerateIn(net.minecraft.util.registry.RegistryKey<net.minecraft.world.dimension.DimensionOptions> dimensionKey)
    Tries to determine whether this biome generates in a specific dimension, based on the GeneratorOptions used by the current world-save.
    net.minecraft.world.biome.Biome
    Returns the biome with modifications by biome modifiers of higher priority already applied.
    net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>
     
    net.minecraft.util.registry.RegistryEntry<net.minecraft.world.biome.Biome>
     
    Optional<net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.ConfiguredFeature<?,?>>>
    getFeatureKey(net.minecraft.world.gen.feature.ConfiguredFeature<?,?> configuredFeature)
    Tries to retrieve the registry key for the given configured feature, which should be from this biomes current feature list.
    Optional<net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.PlacedFeature>>
    getPlacedFeatureKey(net.minecraft.world.gen.feature.PlacedFeature placedFeature)
    Tries to retrieve the registry key for the given placed feature, which should be from this biomes current feature list.
    Optional<net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.structure.StructureType>>
    getStructureKey(net.minecraft.world.gen.structure.StructureType structureFeature)
    Tries to retrieve the registry key for the given configured feature, which should be from this biomes current structure list.
    default boolean
    hasBuiltInFeature(net.minecraft.world.gen.feature.ConfiguredFeature<?,?> configuredFeature)
    Returns true if this biome has the given configured feature, which must be registered in the BuiltinRegistries.
    default boolean
    hasBuiltInPlacedFeature(net.minecraft.world.gen.feature.PlacedFeature placedFeature)
    Returns true if this biome has the given placed feature, which must be registered in the BuiltinRegistries.
    default boolean
    hasFeature(net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.ConfiguredFeature<?,?>> key)
    Returns true if this biome contains a placed feature referencing a configured feature with the given key.
    default boolean
    hasPlacedFeature(net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.PlacedFeature> key)
    Returns true if this biome contains a placed feature with the given key.
    boolean
    hasTag(net.minecraft.tag.TagKey<net.minecraft.world.biome.Biome> tag)
    Returns true if this biome is in the given TagKey.
    default boolean
    validForBuiltInStructure(net.minecraft.world.gen.structure.StructureType structureFeature)
    Returns true if the given built-in configured structure from BuiltinRegistries can start in this biome in any of the chunk generators used by the current world-save.
    boolean
    validForStructure(net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.structure.StructureType> key)
    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

      net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome> getBiomeKey()
    • getBiome

      net.minecraft.world.biome.Biome getBiome()
      Returns the biome with modifications by biome modifiers of higher priority already applied.
    • getBiomeRegistryEntry

      net.minecraft.util.registry.RegistryEntry<net.minecraft.world.biome.Biome> getBiomeRegistryEntry()
    • hasBuiltInFeature

      default boolean hasBuiltInFeature(net.minecraft.world.gen.feature.ConfiguredFeature<?,?> configuredFeature)
      Returns true if this biome has the given configured feature, which must be registered in the BuiltinRegistries.

      This method is intended for use with the Vanilla configured features found in classes such as OreConfiguredFeatures.

    • hasBuiltInPlacedFeature

      default boolean hasBuiltInPlacedFeature(net.minecraft.world.gen.feature.PlacedFeature placedFeature)
      Returns true if this biome has the given placed feature, which must be registered in the BuiltinRegistries.

      This method is intended for use with the Vanilla placed features found in classes such as OrePlacedFeatures.

    • hasFeature

      default boolean hasFeature(net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.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.util.registry.RegistryKey<net.minecraft.world.gen.feature.PlacedFeature> key)
      Returns true if this biome contains a placed feature with the given key.
    • getFeatureKey

      Optional<net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.ConfiguredFeature<?,?>>> getFeatureKey(net.minecraft.world.gen.feature.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

      Optional<net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.PlacedFeature>> getPlacedFeatureKey(net.minecraft.world.gen.feature.PlacedFeature placedFeature)
      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.
    • validForBuiltInStructure

      default boolean validForBuiltInStructure(net.minecraft.world.gen.structure.StructureType structureFeature)
      Returns true if the given built-in configured structure from BuiltinRegistries can start in this biome in any of the chunk generators used by the current world-save.

      This method is intended for use with the Vanilla configured structures found in StructureTypes.

    • validForStructure

      boolean validForStructure(net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.structure.StructureType> key)
      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

      Optional<net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.structure.StructureType>> getStructureKey(net.minecraft.world.gen.structure.StructureType structureFeature)
      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

      boolean canGenerateIn(net.minecraft.util.registry.RegistryKey<net.minecraft.world.dimension.DimensionOptions> dimensionKey)
      Tries to determine whether this biome generates in a specific dimension, based on the GeneratorOptions used by the current world-save.

      If no dimension options exist for the given dimension key, false is returned.

    • hasTag

      boolean hasTag(net.minecraft.tag.TagKey<net.minecraft.world.biome.Biome> tag)
      Returns true if this biome is in the given TagKey..
      Returns:
      true if this biome is in the given TagKey