Struct ItemDrop
#[non_exhaustive]pub struct ItemDrop {
pub stack: ItemStack,
pub position: [f64; 3],
pub velocity: [f64; 3],
pub pickup_delay: u32,
}Expand description
An item that drops where a living entity died, before it is an item entity
in the level (living_drops): what ItemEntity’s constructor was given.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.stack: ItemStackThe dropped stack.
position: [f64; 3]Where the item entity appears, in blocks.
velocity: [f64; 3]Its motion in blocks per tick, as vanilla’s constructor drew it.
pickup_delay: u32Ticks before a player may pick it up.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ItemDrop
Auto Trait Implementations§
impl Freeze for ItemDrop
impl RefUnwindSafe for ItemDrop
impl Send for ItemDrop
impl Sync for ItemDrop
impl Unpin for ItemDrop
impl UnsafeUnpin for ItemDrop
impl UnwindSafe for ItemDrop
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