Interface BiomeFilter

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BiomeFilter
A functional interface representing a predicate (boolean test) for Biomes, used to determine whether a biome satisfies specific criteria.

Filters can be composed using logical operations like and(cz.jeme.bestium.api.inject.biome.BiomeFilter...), or(cz.jeme.bestium.api.inject.biome.BiomeFilter...), or not(cz.jeme.bestium.api.inject.biome.BiomeFilter).

  • Method Summary

    Modifier and Type
    Method
    Description
    and(BiomeFilter... filters)
    Creates a filter that matches only biomes which match all of the provided filters.
    baseTemperature(org.apache.commons.lang3.DoubleRange temperatureRange)
    Creates a filter that matches biomes with a base temperature within the given range.
    end()
    Creates a filter that matches biomes tagged with minecraft:is_end.
    key(Key biomeKey)
    Creates a filter that matches exactly one biome, identified by the given biome key.
    keys(Set<Key> biomeKeys)
    Creates a filter that matches any biome whose key is included in the provided set.
    keys(Key first, Key second, Key... rest)
    Creates a filter that matches any biome whose key is included in the provided array of keys.
    Creates a filter that matches biomes tagged with minecraft:is_nether.
    not(BiomeFilter filter)
    Creates a filter that matches biomes that do not satisfy the given filter.
    or(BiomeFilter... filters)
    Creates a filter that matches biomes which match at least one of the provided filters.
    Creates a filter that matches biomes tagged with minecraft:is_overworld.
    tag(Key tagKey)
    Creates a filter that matches biomes assigned to the specified biome tag.
    boolean
    test(net.minecraft.world.level.biome.Biome biome)
    Tests whether the given Biome matches the criteria defined by this filter.
  • Method Details

    • test

      boolean test(net.minecraft.world.level.biome.Biome biome)
      Tests whether the given Biome matches the criteria defined by this filter.
      Parameters:
      biome - the biome to test
      Returns:
      true if the biome matches the filter, false otherwise
    • and

      static BiomeFilter and(BiomeFilter... filters)
      Creates a filter that matches only biomes which match all of the provided filters.
      Parameters:
      filters - the filters to combine with a logical AND
      Returns:
      a filter that matches biomes satisfying all given filters
    • or

      static BiomeFilter or(BiomeFilter... filters)
      Creates a filter that matches biomes which match at least one of the provided filters.
      Parameters:
      filters - the filters to combine with a logical OR
      Returns:
      a filter that matches biomes satisfying any of the given filters
    • not

      static BiomeFilter not(BiomeFilter filter)
      Creates a filter that matches biomes that do not satisfy the given filter.
      Parameters:
      filter - the filter to negate
      Returns:
      a filter that matches the logical negation of the given filter
    • baseTemperature

      static BiomeFilter baseTemperature(org.apache.commons.lang3.DoubleRange temperatureRange)
      Creates a filter that matches biomes with a base temperature within the given range.

      You may also use the predefined ranges in BiomeTemperature.

      Parameters:
      temperatureRange - the inclusive temperature range to match
      Returns:
      a filter matching biomes with a base temperature in the given range
      See Also:
    • tag

      static BiomeFilter tag(Key tagKey)
      Creates a filter that matches biomes assigned to the specified biome tag.
      Parameters:
      tagKey - the key of the tag to match (e.g., minecraft:is_savanna)
      Returns:
      a filter that matches biomes tagged with the given key
      See Also:
    • key

      static BiomeFilter key(Key biomeKey)
      Creates a filter that matches exactly one biome, identified by the given biome key.
      Parameters:
      biomeKey - the key of the biome to match
      Returns:
      a filter that matches only the specified biome
      See Also:
    • keys

      static BiomeFilter keys(Set<Key> biomeKeys)
      Creates a filter that matches any biome whose key is included in the provided set.
      Parameters:
      biomeKeys - the set of biome keys to match
      Returns:
      a filter that matches any biome in the given set
      See Also:
    • keys

      static BiomeFilter keys(Key first, Key second, Key... rest)
      Creates a filter that matches any biome whose key is included in the provided array of keys.
      Parameters:
      first - the first biome keys to match
      second - the second biome keys to match
      rest - the rest of the biome keys to match
      Returns:
      a filter that matches any biome in the given array of keys keys
      See Also:
    • overworld

      static BiomeFilter overworld()
      Creates a filter that matches biomes tagged with minecraft:is_overworld.

      Note: This filter will not match most datapack biomes.

      Returns:
      a filter for vanilla overworld biomes
    • nether

      static BiomeFilter nether()
      Creates a filter that matches biomes tagged with minecraft:is_nether.

      Note: This filter will not match most datapack biomes.

      Returns:
      a filter for vanilla Nether biomes
    • end

      static BiomeFilter end()
      Creates a filter that matches biomes tagged with minecraft:is_end.

      Note: This filter will not match most datapack biomes.

      Returns:
      a filter for vanilla End biomes