pub struct Entity { /* private fields */ }
Implementations§
Source§impl Entity
impl Entity
Sourcepub unsafe fn from_id(id: u8) -> Option<Self>
pub unsafe fn from_id(id: u8) -> Option<Self>
§Safety
id
must exist.
Entity
cannot outlive the entity in-game.
Entities
will use Weak
to make sure this dies when the entity is removed.
pub fn get_inner(&self) -> &Entity
Sourcepub fn get_inner_mut(&mut self) -> &mut Entity
pub fn get_inner_mut(&mut self) -> &mut Entity
§Safety
Entity
cannot outlive the entity in-game.
Entities
will use Weak
to make sure this dies when the entity is removed.
pub fn get_id(&self) -> u8
pub fn get_position(&self) -> Vec3
pub fn get_head(&self) -> [f32; 2]
pub fn get_velocity(&self) -> Vec3
pub unsafe fn get_model(&self) -> Option<&Model>
pub fn get_model_eye_y(&self) -> f32
pub fn get_model_name_y(&self) -> f32
pub fn get_model_scale(&self) -> Vec3
pub fn get_display_name(&self) -> String
pub fn get_eye_height(&self) -> f32
pub fn get_eye_position(&self) -> Vec3
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl !Send for Entity
impl !Sync for Entity
impl Unpin for Entity
impl !UnwindSafe for Entity
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