Package net.fabricmc.fabric.api.biome.v1
Class BiomeModifications
java.lang.Object
net.fabricmc.fabric.api.biome.v1.BiomeModifications
Provides an API to modify Biomes after they have been loaded and before they are used in the World.
Any modifications made to biomes will not be available for use in server.properties (as of 1.16.1), or the demo level.
Experimental feature, may be removed or changed without further notice.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCarver
(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.world.gen.GenerationStep.Carver step, net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.carver.ConfiguredCarver<?>> configuredCarverKey) Convenience method to add a carver to one or more biomes.static void
addFeature
(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.world.gen.GenerationStep.Feature step, net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.PlacedFeature> configuredFeatureKey) Convenience method to add a feature to one or more biomes.static void
addSpawn
(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.entity.SpawnGroup spawnGroup, net.minecraft.entity.EntityType<?> entityType, int weight, int minGroupSize, int maxGroupSize) Convenience method to add an entity spawn to one or more biomes.static void
addStructure
(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.ConfiguredStructureFeature<?, ?>> configuredStructureKey) Convenience method to add a structure to one or more biomes.static BiomeModification
create
(net.minecraft.util.Identifier id) Create a new biome modification which will be applied whenever biomes are loaded from datapacks.
-
Constructor Details
-
BiomeModifications
public BiomeModifications()
-
-
Method Details
-
addFeature
public static void addFeature(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.world.gen.GenerationStep.Feature step, net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.PlacedFeature> configuredFeatureKey) Convenience method to add a feature to one or more biomes.- See Also:
-
addStructure
public static void addStructure(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.feature.ConfiguredStructureFeature<?, ?>> configuredStructureKey) Convenience method to add a structure to one or more biomes.- See Also:
-
addCarver
public static void addCarver(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.world.gen.GenerationStep.Carver step, net.minecraft.util.registry.RegistryKey<net.minecraft.world.gen.carver.ConfiguredCarver<?>> configuredCarverKey) Convenience method to add a carver to one or more biomes.- See Also:
-
addSpawn
public static void addSpawn(Predicate<BiomeSelectionContext> biomeSelector, net.minecraft.entity.SpawnGroup spawnGroup, net.minecraft.entity.EntityType<?> entityType, int weight, int minGroupSize, int maxGroupSize) Convenience method to add an entity spawn to one or more biomes.- See Also:
-
BiomeSelectors
SpawnSettings.Builder.spawn(SpawnGroup, SpawnSettings.SpawnEntry)
-
create
Create a new biome modification which will be applied whenever biomes are loaded from datapacks.- Parameters:
id
- An identifier for the new set of biome modifications that is returned. Is used for guaranteeing consistent ordering between the biome modifications added by different mods (assuming they otherwise have the same phase).
-