Package net.fabricmc.fabric.api.biome.v1
Interface BiomeModificationContext.SpawnSettingsContext
- Enclosing interface:
BiomeModificationContext
public static interface BiomeModificationContext.SpawnSettingsContext
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpawn(SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry) Associated JSON property:spawners.voidclearSpawnCost(EntityType<?> entityType) Removes a spawn cost entry for a given entity type.default voidRemoves all spawns.default voidclearSpawns(SpawnGroup group) Removes all spawns of the given spawn group.booleanremoveSpawns(BiPredicate<SpawnGroup, SpawnSettings.SpawnEntry> predicate) Removes any spawns matching the given predicate from this biome, and returns true if any matched.default booleanremoveSpawnsOfEntityType(EntityType<?> entityType) Removes all spawns of the given entity type.voidsetCreatureSpawnProbability(float probability) Associated JSON property:creature_spawn_probability.voidsetSpawnCost(EntityType<?> entityType, double mass, double gravityLimit) Associated JSON property:spawn_costs.
-
Method Details
-
setCreatureSpawnProbability
void setCreatureSpawnProbability(float probability) Associated JSON property:creature_spawn_probability.- See Also:
-
addSpawn
Associated JSON property:spawners.- See Also:
-
removeSpawns
Removes any spawns matching the given predicate from this biome, and returns true if any matched.Associated JSON property:
spawners. -
removeSpawnsOfEntityType
Removes all spawns of the given entity type.Associated JSON property:
spawners.- Returns:
- True if any spawns were removed.
-
clearSpawns
Removes all spawns of the given spawn group.Associated JSON property:
spawners. -
clearSpawns
default void clearSpawns()Removes all spawns.Associated JSON property:
spawners. -
setSpawnCost
Associated JSON property:spawn_costs.- See Also:
-
clearSpawnCost
Removes a spawn cost entry for a given entity type.Associated JSON property:
spawn_costs.
-