Package net.fabricmc.fabric.api.biome.v1
Interface BiomeModificationContext.SpawnSettingsContext
- Enclosing interface:
BiomeModificationContext
public static interface BiomeModificationContext.SpawnSettingsContext
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSpawn
(SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry) Associated JSON property:spawners
.void
clearSpawnCost
(EntityType<?> entityType) Removes a spawn cost entry for a given entity type.default void
Removes all spawns.default void
clearSpawns
(SpawnGroup group) Removes all spawns of the given spawn group.boolean
removeSpawns
(BiPredicate<SpawnGroup, SpawnSettings.SpawnEntry> predicate) Removes any spawns matching the given predicate from this biome, and returns true if any matched.default boolean
removeSpawnsOfEntityType
(EntityType<?> entityType) Removes all spawns of the given entity type.void
setCreatureSpawnProbability
(float probability) Associated JSON property:creature_spawn_probability
.void
setSpawnCost
(EntityType<?> entityType, double mass, double gravityLimit) Associated JSON property:spawn_costs
.
-
Method Details
-
setCreatureSpawnProbability
void setCreatureSpawnProbability(float probability) Associated JSON property:creature_spawn_probability
. -
addSpawn
Associated JSON property:spawners
. -
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
. -
clearSpawnCost
Removes a spawn cost entry for a given entity type.Associated JSON property:
spawn_costs
.
-