pub struct EntitySpawnEvent {
pub entity_type: String,
pub uuid: String,
pub dimension: String,
}Expand description
Fired when any entity is loaded into a world (server side).
Also used for on_entity_spawn_pre (cancellable): return false to
discard the entity immediately after loading (effective spawn cancellation).
Fields§
§entity_type: StringRegistry id of the entity, e.g. minecraft:zombie.
uuid: String§dimension: StringDimension the entity was added to, e.g. minecraft:overworld.
Trait Implementations§
Source§impl Clone for EntitySpawnEvent
impl Clone for EntitySpawnEvent
Source§fn clone(&self) -> EntitySpawnEvent
fn clone(&self) -> EntitySpawnEvent
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 moreAuto Trait Implementations§
impl Freeze for EntitySpawnEvent
impl RefUnwindSafe for EntitySpawnEvent
impl Send for EntitySpawnEvent
impl Sync for EntitySpawnEvent
impl Unpin for EntitySpawnEvent
impl UnsafeUnpin for EntitySpawnEvent
impl UnwindSafe for EntitySpawnEvent
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