pub struct BlockPlacedEvent {
pub position: BlockPosition,
pub block_state: u16,
pub sequence: i32,
pub cancelled: bool,
}Expand description
A player placed a block.
Fired when the server receives a BlockPlace packet with a valid
held item. The placement position has already been computed from
the target block + face offset. The placing player is available
via ctx.player().
Fields§
§position: BlockPositionPosition where the block was placed.
block_state: u16The block state ID that was placed.
sequence: i32Sequence number for client acknowledgement.
cancelled: boolWhether this event has been cancelled by a Validate handler.
Trait Implementations§
Source§impl Clone for BlockPlacedEvent
impl Clone for BlockPlacedEvent
Source§fn clone(&self) -> BlockPlacedEvent
fn clone(&self) -> BlockPlacedEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockPlacedEvent
impl Debug for BlockPlacedEvent
Source§impl Event for BlockPlacedEvent
impl Event for BlockPlacedEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Source§impl EventRouting for BlockPlacedEvent
impl EventRouting for BlockPlacedEvent
Auto Trait Implementations§
impl Freeze for BlockPlacedEvent
impl RefUnwindSafe for BlockPlacedEvent
impl Send for BlockPlacedEvent
impl Sync for BlockPlacedEvent
impl Unpin for BlockPlacedEvent
impl UnsafeUnpin for BlockPlacedEvent
impl UnwindSafe for BlockPlacedEvent
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