pub struct TickView<'a> { /* private fields */ }Expand description
A read-only view after the movement step (Behavior::after_tick).
Implementations§
Source§impl TickView<'_>
impl TickView<'_>
Sourcepub fn version(&self) -> GameVersion
pub fn version(&self) -> GameVersion
The protocol version.
Sourcepub fn sent(&self) -> &Pose
pub fn sent(&self) -> &Pose
What the server has after this tick’s movement packet (position, look, flags).
Sourcepub fn entities(&self) -> Option<&Entities>
pub fn entities(&self) -> Option<&Entities>
The tracked entities (with Interests::ENTITIES).
Sourcepub fn events(&self) -> &TickEvents
pub fn events(&self) -> &TickEvents
What the behaviour saw this tick (the events of TickContext::events).
Sourcepub fn swings(&self) -> u64
pub fn swings(&self) -> u64
Arm swings sent so far (see TickContext::swings).
Sourcepub fn dimension(&self) -> &str
pub fn dimension(&self) -> &str
The current dimension ("0" / "-1" / "1" on 1.8, the world name on 1.16), as
TickContext::dimension.
Sourcepub fn using_item(&self) -> bool
pub fn using_item(&self) -> bool
Using the held item (eating, blocking, drawing a bow): movement input is slowed. As
TickContext::using_item.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TickView<'a>
impl<'a> !Send for TickView<'a>
impl<'a> !Sync for TickView<'a>
impl<'a> !UnwindSafe for TickView<'a>
impl<'a> Freeze for TickView<'a>
impl<'a> Unpin for TickView<'a>
impl<'a> UnsafeUnpin for TickView<'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