Struct SpawnFlags
pub struct SpawnFlags {
pub monsters: bool,
pub friendlies: bool,
}Expand description
Which categories a level’s natural spawning (NaturalSpawner.spawnForChunk)
may spawn at all, read and set through LevelRef::spawn_flags and
set_spawn_flags. A flag only takes away, for its level alone: monsters
still need the spawn_monsters game rule, and nothing spawns naturally with
spawn_mobs off. Spawners, patrols, sieges, phantoms, a new chunk’s
creatures and other custom spawners don’t read the flags.
Fields§
§monsters: boolWhether MobCategory::Monster spawns: off acts as the spawn_monsters
rule off does (getFilteredSpawningCategories’ spawnEnemies).
friendlies: boolWhether every other spawning category spawns: creatures, ambient and water mobs, axolotls. Horizon’s own; vanilla has no such switch.
Trait Implementations§
§impl Clone for SpawnFlags
impl Clone for SpawnFlags
§fn clone(&self) -> SpawnFlags
fn clone(&self) -> SpawnFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpawnFlags
§impl Debug for SpawnFlags
impl Debug for SpawnFlags
§impl Default for SpawnFlags
impl Default for SpawnFlags
§fn default() -> SpawnFlags
fn default() -> SpawnFlags
Both on, as every level starts.
impl Eq for SpawnFlags
§impl Hash for SpawnFlags
impl Hash for SpawnFlags
§impl PartialEq for SpawnFlags
impl PartialEq for SpawnFlags
impl StructuralPartialEq for SpawnFlags
Auto Trait Implementations§
impl Freeze for SpawnFlags
impl RefUnwindSafe for SpawnFlags
impl Send for SpawnFlags
impl Sync for SpawnFlags
impl Unpin for SpawnFlags
impl UnsafeUnpin for SpawnFlags
impl UnwindSafe for SpawnFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more