Interface BiomeSelectionContext


public interface BiomeSelectionContext
Context given to a biome selector for deciding whether it applies to a biome or not.
  • 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

      default boolean hasFeature(RegistryKey<ConfiguredFeature<?,?>> key)
      Returns true if this biome contains a placed feature referencing a configured feature with the given key.
    • hasPlacedFeature

      default boolean hasPlacedFeature(RegistryKey<PlacedFeature> key)
      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

      Optional<RegistryKey<PlacedFeature>> getPlacedFeatureKey(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.
    • validForStructure

      boolean validForStructure(RegistryKey<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 world-save.
    • getStructureKey

      Optional<RegistryKey<Structure>> getStructureKey(Structure 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(RegistryKey<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(TagKey<Biome> tag)
      Returns true if this biome is in the given TagKey..
      Returns:
      true if this biome is in the given TagKey