Enum SpawnReason
#[non_exhaustive]pub enum SpawnReason {
Show 19 variants
Natural,
ChunkGeneration,
Spawner,
TrialSpawner,
Reinforcement,
Patrol,
Structure,
Event,
Command,
SpawnItemUse,
MobSummoned,
Conversion,
Breeding,
Triggered,
Jockey,
Dispenser,
Bucket,
Load,
DimensionTravel,
}Expand description
Why a mob spawns (EntitySpawnReason).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Natural
NATURAL: the level’s own spawning each tick.
ChunkGeneration
CHUNK_GENERATION: a new chunk’s creature packs.
Spawner
SPAWNER: a mob spawner block.
TrialSpawner
TRIAL_SPAWNER: a trial spawner.
Reinforcement
REINFORCEMENT: a zombie calling for help.
Patrol
PATROL: a pillager patrol.
Structure
STRUCTURE: a structure’s own mobs.
Event
EVENT: a world event, such as a village siege.
Command
COMMAND: /summon.
SpawnItemUse
SPAWN_ITEM_USE: a spawn egg.
MobSummoned
MOB_SUMMONED: a mob that summons another (an evoker’s vexes).
Conversion
CONVERSION: a mob that became another.
Breeding
BREEDING: a baby.
Triggered
TRIGGERED: a block or item set it off (a sculk shrieker’s warden).
Jockey
JOCKEY: a rider spawned on a mount.
Dispenser
DISPENSER: a dispenser fired a spawn egg.
Bucket
BUCKET: a bucketed mob released.
Load
LOAD: loaded from saved data.
DimensionTravel
DIMENSION_TRAVEL: a mob that crossed a portal.
Trait Implementations§
§impl Clone for SpawnReason
impl Clone for SpawnReason
§fn clone(&self) -> SpawnReason
fn clone(&self) -> SpawnReason
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 SpawnReason
§impl Debug for SpawnReason
impl Debug for SpawnReason
impl Eq for SpawnReason
§impl PartialEq for SpawnReason
impl PartialEq for SpawnReason
impl StructuralPartialEq for SpawnReason
Auto Trait Implementations§
impl Freeze for SpawnReason
impl RefUnwindSafe for SpawnReason
impl Send for SpawnReason
impl Sync for SpawnReason
impl Unpin for SpawnReason
impl UnsafeUnpin for SpawnReason
impl UnwindSafe for SpawnReason
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