Package net.fabricmc.fabric.api.biome.v1
Interface BiomeModificationContext.SpawnSettingsContext
- Enclosing interface:
- BiomeModificationContext
public static interface BiomeModificationContext.SpawnSettingsContext
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSpawn(net.minecraft.entity.SpawnGroup spawnGroup, net.minecraft.world.biome.SpawnSettings.SpawnEntry spawnEntry)
Associated JSON property:spawners
.void
clearSpawnCost(net.minecraft.entity.EntityType<?> entityType)
Removes a spawn cost entry for a given entity type.default void
Removes all spawns.default void
clearSpawns(net.minecraft.entity.SpawnGroup group)
Removes all spawns of the given spawn group.boolean
removeSpawns(BiPredicate<net.minecraft.entity.SpawnGroup,net.minecraft.world.biome.SpawnSettings.SpawnEntry> predicate)
Removes any spawns matching the given predicate from this biome, and returns true if any matched.default boolean
removeSpawnsOfEntityType(net.minecraft.entity.EntityType<?> entityType)
Removes all spawns of the given entity type.void
setCreatureSpawnProbability(float probability)
Associated JSON property:creature_spawn_probability
.void
setPlayerSpawnFriendly(boolean playerSpawnFriendly)
Associated JSON property:player_spawn_friendly
.void
setSpawnCost(net.minecraft.entity.EntityType<?> entityType, double mass, double gravityLimit)
Associated JSON property:spawn_costs
.
-
Method Details
-
setPlayerSpawnFriendly
void setPlayerSpawnFriendly(boolean playerSpawnFriendly)Associated JSON property:player_spawn_friendly
.- See Also:
SpawnSettings.isPlayerSpawnFriendly()
,SpawnSettings.Builder.playerSpawnFriendly()
-
setCreatureSpawnProbability
void setCreatureSpawnProbability(float probability)Associated JSON property:creature_spawn_probability
.- See Also:
SpawnSettings.getCreatureSpawnProbability()
,SpawnSettings.Builder.creatureSpawnProbability(float)
-
addSpawn
void addSpawn(net.minecraft.entity.SpawnGroup spawnGroup, net.minecraft.world.biome.SpawnSettings.SpawnEntry spawnEntry)Associated JSON property:spawners
.- See Also:
SpawnSettings.getSpawnEntry(SpawnGroup)
,SpawnSettings.Builder.spawn(SpawnGroup, SpawnSettings.SpawnEntry)
-
removeSpawns
boolean removeSpawns(BiPredicate<net.minecraft.entity.SpawnGroup,net.minecraft.world.biome.SpawnSettings.SpawnEntry> predicate)Removes any spawns matching the given predicate from this biome, and returns true if any matched.Associated JSON property:
spawners
. -
removeSpawnsOfEntityType
default boolean removeSpawnsOfEntityType(net.minecraft.entity.EntityType<?> entityType)Removes all spawns of the given entity type.Associated JSON property:
spawners
.- Returns:
- True if any spawns were removed.
-
clearSpawns
default void clearSpawns(net.minecraft.entity.SpawnGroup group)Removes all spawns of the given spawn group.Associated JSON property:
spawners
. -
clearSpawns
default void clearSpawns()Removes all spawns.Associated JSON property:
spawners
. -
setSpawnCost
void setSpawnCost(net.minecraft.entity.EntityType<?> entityType, double mass, double gravityLimit)Associated JSON property:spawn_costs
.- See Also:
SpawnSettings.getSpawnDensity(EntityType)
,SpawnSettings.Builder.spawnCost(EntityType, double, double)
-
clearSpawnCost
void clearSpawnCost(net.minecraft.entity.EntityType<?> entityType)Removes a spawn cost entry for a given entity type.Associated JSON property:
spawn_costs
.
-