Package cz.jeme.bestium.api.inject.biome
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.
A functional interface representing a predicate (boolean test) for
Biome
s,
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 TypeMethodDescriptionstatic BiomeFilter
and
(BiomeFilter... filters) Creates a filter that matches only biomes which match all of the provided filters.static BiomeFilter
baseTemperature
(org.apache.commons.lang3.DoubleRange temperatureRange) Creates a filter that matches biomes with a base temperature within the given range.static BiomeFilter
end()
Creates a filter that matches biomes tagged withminecraft:is_end
.static BiomeFilter
Creates a filter that matches exactly one biome, identified by the given biome key.static BiomeFilter
Creates a filter that matches any biome whose key is included in the provided set.static BiomeFilter
Creates a filter that matches any biome whose key is included in the provided array of keys.static BiomeFilter
nether()
Creates a filter that matches biomes tagged withminecraft:is_nether
.static BiomeFilter
not
(BiomeFilter filter) Creates a filter that matches biomes that do not satisfy the given filter.static BiomeFilter
or
(BiomeFilter... filters) Creates a filter that matches biomes which match at least one of the provided filters.static BiomeFilter
Creates a filter that matches biomes tagged withminecraft:is_overworld
.static BiomeFilter
Creates a filter that matches biomes assigned to the specified biome tag.boolean
test
(net.minecraft.world.level.biome.Biome biome) Tests whether the givenBiome
matches the criteria defined by this filter.
-
Method Details
-
test
boolean test(net.minecraft.world.level.biome.Biome biome) Tests whether the givenBiome
matches the criteria defined by this filter.- Parameters:
biome
- the biome to test- Returns:
true
if the biome matches the filter,false
otherwise
-
and
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
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
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
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
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
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
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
Creates a filter that matches any biome whose key is included in the provided array of keys.- Parameters:
first
- the first biome keys to matchsecond
- the second biome keys to matchrest
- 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
Creates a filter that matches biomes tagged withminecraft:is_overworld
.Note: This filter will not match most datapack biomes.
- Returns:
- a filter for vanilla overworld biomes
-
nether
Creates a filter that matches biomes tagged withminecraft:is_nether
.Note: This filter will not match most datapack biomes.
- Returns:
- a filter for vanilla Nether biomes
-
end
Creates a filter that matches biomes tagged withminecraft:is_end
.Note: This filter will not match most datapack biomes.
- Returns:
- a filter for vanilla End biomes
-