struct ItemEntityState {
age: i32,
pickup_delay: i32,
health: i32,
thrower: Option<Uuid>,
owner: Option<Uuid>,
}Expand description
Mutable item-specific state that changes during item ticks, pickup, damage, merging, and save/load.
Fields§
§age: i32Age in ticks. Despawns at LIFETIME (6000). Special value -32768 = infinite.
pickup_delay: i32Ticks until pickupable. 0 = can pickup, 32767 = never.
health: i32Health (damage resistance). Item is destroyed when this reaches 0.
thrower: Option<Uuid>UUID of the entity that threw/dropped this item.
owner: Option<Uuid>UUID of the only entity that can pick up this item.
If None, any player can pick it up. Vanilla calls this target.
Implementations§
Auto Trait Implementations§
impl Freeze for ItemEntityState
impl RefUnwindSafe for ItemEntityState
impl Send for ItemEntityState
impl Sync for ItemEntityState
impl Unpin for ItemEntityState
impl UnsafeUnpin for ItemEntityState
impl UnwindSafe for ItemEntityState
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>