Struct SpawnLimits
pub struct SpawnLimits {
pub monster: u32,
pub creature: u32,
pub ambient: u32,
pub axolotls: u32,
pub underground_water_creature: u32,
pub water_creature: u32,
pub water_ambient: u32,
}Expand description
How many mobs of each spawning category a level’s natural spawning allows
(MobCategory.getMaxInstancesPerChunk), read and set through
LevelRef::spawn_limits and set_spawn_limits. Each limit counts twice, as
vanilla’s own does: the level spawns a category only while its count of
that category’s mobs stays under limit * spawnable chunks / 289 (one
player’s 17 by 17 chunks hold the vanilla value), and only in a chunk with
a player near it who has fewer than limit of them around. A limit of 0
stops the category’s natural spawning. MobCategory::Misc never spawns
naturally, so it has no limit.
Fields§
§monster: u32MONSTER: 70 in vanilla.
creature: u32CREATURE: 10 in vanilla.
ambient: u32AMBIENT: 15 in vanilla.
axolotls: u32AXOLOTLS: 5 in vanilla.
underground_water_creature: u32UNDERGROUND_WATER_CREATURE: 5 in vanilla.
water_creature: u32WATER_CREATURE: 5 in vanilla.
water_ambient: u32WATER_AMBIENT: 20 in vanilla.
Implementations§
§impl SpawnLimits
impl SpawnLimits
pub const VANILLA: SpawnLimits
pub const VANILLA: SpawnLimits
Vanilla’s limits, which every level starts with.
Trait Implementations§
§impl Clone for SpawnLimits
impl Clone for SpawnLimits
§fn clone(&self) -> SpawnLimits
fn clone(&self) -> SpawnLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more