pub struct EntityGroundContact {
supporting_block: Option<BlockPos>,
on_ground_no_blocks: bool,
}Expand description
Vanilla ground-support state updated by Entity.checkSupportingBlock.
Fields§
§supporting_block: Option<BlockPos>§on_ground_no_blocks: boolImplementations§
Source§impl EntityGroundContact
impl EntityGroundContact
Sourcepub const fn on_ground(supporting_block: Option<BlockPos>) -> Self
pub const fn on_ground(supporting_block: Option<BlockPos>) -> Self
Creates grounded contact state from the support search result.
Sourcepub const fn supporting_block(self) -> Option<BlockPos>
pub const fn supporting_block(self) -> Option<BlockPos>
Returns the supporting block selected by vanilla support rules.
Sourcepub const fn on_ground_no_blocks(self) -> bool
pub const fn on_ground_no_blocks(self) -> bool
Returns true when the entity is grounded but no block support was found.
Trait Implementations§
Source§impl Clone for EntityGroundContact
impl Clone for EntityGroundContact
Source§fn clone(&self) -> EntityGroundContact
fn clone(&self) -> EntityGroundContact
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 EntityGroundContact
Source§impl Debug for EntityGroundContact
impl Debug for EntityGroundContact
Source§impl Default for EntityGroundContact
impl Default for EntityGroundContact
Source§fn default() -> EntityGroundContact
fn default() -> EntityGroundContact
Returns the “default value” for a type. Read more
impl Eq for EntityGroundContact
Source§impl PartialEq for EntityGroundContact
impl PartialEq for EntityGroundContact
impl StructuralPartialEq for EntityGroundContact
Auto Trait Implementations§
impl Freeze for EntityGroundContact
impl RefUnwindSafe for EntityGroundContact
impl Send for EntityGroundContact
impl Sync for EntityGroundContact
impl Unpin for EntityGroundContact
impl UnsafeUnpin for EntityGroundContact
impl UnwindSafe for EntityGroundContact
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compares
self with key and returns true if they are equal.§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<>>