pub struct EntityRef<'a> {
pub entity_type: Option<&'a Identifier>,
pub flags: EntityRefFlags,
pub equipment: Option<&'a EntityEquipmentRef<'a>>,
pub custom_name: Option<&'a str>,
pub sheep_color: Option<DyeColor>,
pub sheep_sheared: Option<bool>,
pub chicken_variant: Option<&'a Identifier>,
}Expand description
A reference to an entity for loot context. This is intentionally opaque - the actual entity type depends on game implementation.
Fields§
§entity_type: Option<&'a Identifier>Type identifier for the entity.
flags: EntityRefFlagsEntity flags for predicate checking.
equipment: Option<&'a EntityEquipmentRef<'a>>Equipment slots for equipment predicates.
custom_name: Option<&'a str>Entity name (for copy_name function).
sheep_color: Option<DyeColor>Vanilla minecraft:components.sheep/color entity data component.
sheep_sheared: Option<bool>Vanilla minecraft:type_specific/sheep.sheared. None when the entity is
not a sheep, matching vanilla SheepPredicate.matches’ non-sheep rejection.
chicken_variant: Option<&'a Identifier>Vanilla minecraft:components.chicken/variant entity data component key.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EntityRef<'a>
impl<'a> !UnwindSafe for EntityRef<'a>
impl<'a> Freeze for EntityRef<'a>
impl<'a> Send for EntityRef<'a>
impl<'a> Sync for EntityRef<'a>
impl<'a> Unpin for EntityRef<'a>
impl<'a> UnsafeUnpin for EntityRef<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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<>>