Struct GameEventContext
pub struct GameEventContext {
pub source_entity: Option<EntityRef>,
pub affected_state: Option<BlockState>,
}Expand description
Vanilla’s GameEvent.Context: optional source and affected block state.
Source facts used by vibration listeners are captured when the event is emitted.
Fields§
§source_entity: Option<EntityRef>Entity responsible for the event, if any. Must be live in the level.
affected_state: Option<BlockState>State affected by the action, which may differ from the state now in the world.
Trait Implementations§
§impl Clone for GameEventContext
impl Clone for GameEventContext
§fn clone(&self) -> GameEventContext
fn clone(&self) -> GameEventContext
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 GameEventContext
§impl Debug for GameEventContext
impl Debug for GameEventContext
§impl Default for GameEventContext
impl Default for GameEventContext
§fn default() -> GameEventContext
fn default() -> GameEventContext
Returns the “default value” for a type. Read more
§impl PartialEq for GameEventContext
impl PartialEq for GameEventContext
impl StructuralPartialEq for GameEventContext
Auto Trait Implementations§
impl Freeze for GameEventContext
impl RefUnwindSafe for GameEventContext
impl Send for GameEventContext
impl Sync for GameEventContext
impl Unpin for GameEventContext
impl UnsafeUnpin for GameEventContext
impl UnwindSafe for GameEventContext
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