Interface BiomeModificationContext.MobSpawnSettingsContext
- Enclosing interface:
BiomeModificationContext
public static interface BiomeModificationContext.MobSpawnSettingsContext
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMobCharge(net.minecraft.world.entity.EntityType<?> entityType, double charge, double energyBudget) Associated environment attribute:EnvironmentAttributes.NATURAL_MOB_SPAWNS.voidaddSpawn(net.minecraft.world.entity.MobCategory category, net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData data, int weight) Associated environment attribute:EnvironmentAttributes.NATURAL_MOB_SPAWNS.voidclearMobCharge(net.minecraft.world.entity.EntityType<?> entityType) Removes a spawn cost entry for a given entity type.default voidRemoves all spawns.default voidclearSpawns(net.minecraft.world.entity.MobCategory category) Removes all spawns of the given category.@UnmodifiableView List<net.minecraft.util.random.Weighted<net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData>> getMobs(net.minecraft.world.entity.MobCategory category) Provides a view of all spawns of the given category.booleanremoveSpawns(BiPredicate<net.minecraft.world.entity.MobCategory, net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData> predicate) Removes any spawns matching the given predicate from this biome, and returns true if any matched.default booleanremoveSpawnsOfEntityType(net.minecraft.world.entity.EntityType<?> entityType) Removes all spawns of the given entity type.voidsetCreatureGenerationProbability(float probability) Associated environment attribute:EnvironmentAttributes.CREATURE_WORLD_GEN_SPAWN_PROBABILITY.
-
Method Details
-
setCreatureGenerationProbability
void setCreatureGenerationProbability(float probability) Associated environment attribute:EnvironmentAttributes.CREATURE_WORLD_GEN_SPAWN_PROBABILITY. -
getMobs
@UnmodifiableView List<net.minecraft.util.random.Weighted<net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData>> getMobs(net.minecraft.world.entity.MobCategory category) Provides a view of all spawns of the given category.Associated environment attribute:
EnvironmentAttributes.NATURAL_MOB_SPAWNS.- See Also:
-
addSpawn
void addSpawn(net.minecraft.world.entity.MobCategory category, net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData data, int weight) Associated environment attribute:EnvironmentAttributes.NATURAL_MOB_SPAWNS.- See Also:
-
removeSpawns
boolean removeSpawns(BiPredicate<net.minecraft.world.entity.MobCategory, net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData> predicate) Removes any spawns matching the given predicate from this biome, and returns true if any matched.Associated environment attribute:
EnvironmentAttributes.NATURAL_MOB_SPAWNS. -
removeSpawnsOfEntityType
default boolean removeSpawnsOfEntityType(net.minecraft.world.entity.EntityType<?> entityType) Removes all spawns of the given entity type.Associated environment attribute:
EnvironmentAttributes.NATURAL_MOB_SPAWNS.- Returns:
- True if any spawns were removed.
-
clearSpawns
default void clearSpawns(net.minecraft.world.entity.MobCategory category) Removes all spawns of the given category.Associated environment attribute:
EnvironmentAttributes.NATURAL_MOB_SPAWNS. -
clearSpawns
default void clearSpawns()Removes all spawns.Associated environment attribute:
EnvironmentAttributes.NATURAL_MOB_SPAWNS. -
addMobCharge
void addMobCharge(net.minecraft.world.entity.EntityType<?> entityType, double charge, double energyBudget) Associated environment attribute:EnvironmentAttributes.NATURAL_MOB_SPAWNS.- See Also:
-
clearMobCharge
void clearMobCharge(net.minecraft.world.entity.EntityType<?> entityType) Removes a spawn cost entry for a given entity type.Associated environment attribute:
EnvironmentAttributes.NATURAL_MOB_SPAWNS.
-