Package net.fabricmc.fabric.api.biome.v1
Class BiomeSelectors
java.lang.Object
net.fabricmc.fabric.api.biome.v1.BiomeSelectors
Provides several convenient biome selectors that can be used with
BiomeModifications
.
Experimental feature, may be removed or changed without further notice.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate<BiomeSelectionContext>
all()
Matches all Biomes.static Predicate<BiomeSelectionContext>
builtIn()
Matches Biomes that have not been originally defined in a datapack, but that are defined in code.static Predicate<BiomeSelectionContext>
excludeByKey
(Collection<net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>> keys) Returns a selector that will reject any biome whos keys is in the given collection of keys.static Predicate<BiomeSelectionContext>
excludeByKey
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>... keys) static Predicate<BiomeSelectionContext>
Returns a biome selector that will match all biomes that would normally spawn in the Overworld, assuming Vanilla's default biome source is used.static Predicate<BiomeSelectionContext>
Returns a biome selector that will match all biomes that would normally spawn in the End, assuming Vanilla's default End biome source is used.static Predicate<BiomeSelectionContext>
Returns a biome selector that will match all biomes that would normally spawn in the Nether, assuming Vanilla's default multi noise biome source with the nether preset is used.static Predicate<BiomeSelectionContext>
includeByKey
(Collection<net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>> keys) Returns a selector that will accept only biomes whos keys are in the given collection of keys.static Predicate<BiomeSelectionContext>
includeByKey
(net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>... keys) static Predicate<BiomeSelectionContext>
spawnsOneOf
(Set<net.minecraft.entity.EntityType<?>> entityTypes) Returns a biome selector that will match biomes in which one of the given entity types can spawn.static Predicate<BiomeSelectionContext>
spawnsOneOf
(net.minecraft.entity.EntityType<?>... entityTypes) Returns a biome selector that will match biomes in which one of the given entity types can spawn.static Predicate<BiomeSelectionContext>
tag
(net.minecraft.tag.TagKey<net.minecraft.world.biome.Biome> tag) Returns a biome selector that will match all biomes in the given tag.static Predicate<BiomeSelectionContext>
vanilla()
Returns a biome selector that will match all biomes from the minecraft namespace.
-
Method Details
-
all
Matches all Biomes. Use a more specific selector if possible. -
builtIn
Matches Biomes that have not been originally defined in a datapack, but that are defined in code. -
vanilla
Returns a biome selector that will match all biomes from the minecraft namespace. -
foundInOverworld
Returns a biome selector that will match all biomes that would normally spawn in the Overworld, assuming Vanilla's default biome source is used. -
foundInTheNether
Returns a biome selector that will match all biomes that would normally spawn in the Nether, assuming Vanilla's default multi noise biome source with the nether preset is used.This selector will also match modded biomes that have been added to the nether using
NetherBiomes
. -
foundInTheEnd
Returns a biome selector that will match all biomes that would normally spawn in the End, assuming Vanilla's default End biome source is used. -
tag
public static Predicate<BiomeSelectionContext> tag(net.minecraft.tag.TagKey<net.minecraft.world.biome.Biome> tag) Returns a biome selector that will match all biomes in the given tag.- See Also:
-
-
invalid @see
net.fabricmc.fabric.api.tag.TagFactory#BIOME
-
-
excludeByKey
@SafeVarargs public static Predicate<BiomeSelectionContext> excludeByKey(net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>... keys) - See Also:
-
excludeByKey
public static Predicate<BiomeSelectionContext> excludeByKey(Collection<net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>> keys) Returns a selector that will reject any biome whos keys is in the given collection of keys.This is useful for allowing a list of biomes to be defined in the config file, where a certain feature should not spawn.
-
includeByKey
@SafeVarargs public static Predicate<BiomeSelectionContext> includeByKey(net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>... keys) - See Also:
-
includeByKey
public static Predicate<BiomeSelectionContext> includeByKey(Collection<net.minecraft.util.registry.RegistryKey<net.minecraft.world.biome.Biome>> keys) Returns a selector that will accept only biomes whos keys are in the given collection of keys.This is useful for allowing a list of biomes to be defined in the config file, where a certain feature should spawn exclusively.
-
spawnsOneOf
public static Predicate<BiomeSelectionContext> spawnsOneOf(net.minecraft.entity.EntityType<?>... entityTypes) Returns a biome selector that will match biomes in which one of the given entity types can spawn.Matches spawns in all
spawn groups
. -
spawnsOneOf
public static Predicate<BiomeSelectionContext> spawnsOneOf(Set<net.minecraft.entity.EntityType<?>> entityTypes) Returns a biome selector that will match biomes in which one of the given entity types can spawn.Matches spawns in all
spawn groups
.
-