pub struct PlayerEntityData {
pub avatar: AvatarEntityData,
pub player_absorption: SyncedValue<f32>,
pub score: SyncedValue<i32>,
pub shoulder_parrot_left: SyncedValue<Option<u32>>,
pub shoulder_parrot_right: SyncedValue<Option<u32>>,
}Expand description
Synchronized entity data declared by the vanilla #struct_name layer.
Fields§
§avatar: AvatarEntityData§player_absorption: SyncedValue<f32>§score: SyncedValue<i32>§shoulder_parrot_left: SyncedValue<Option<u32>>§shoulder_parrot_right: SyncedValue<Option<u32>>Implementations§
Source§impl PlayerEntityData
impl PlayerEntityData
Sourcepub fn player(&self) -> &PlayerEntityData
pub fn player(&self) -> &PlayerEntityData
Returns the PlayerEntityData layer.
Sourcepub fn player_mut(&mut self) -> &mut PlayerEntityData
pub fn player_mut(&mut self) -> &mut PlayerEntityData
Returns the mutable PlayerEntityData layer.
Sourcepub fn avatar(&self) -> &AvatarEntityData
pub fn avatar(&self) -> &AvatarEntityData
Returns the AvatarEntityData layer.
Sourcepub fn avatar_mut(&mut self) -> &mut AvatarEntityData
pub fn avatar_mut(&mut self) -> &mut AvatarEntityData
Returns the mutable AvatarEntityData layer.
Sourcepub fn living_entity(&self) -> &LivingEntityData
pub fn living_entity(&self) -> &LivingEntityData
Returns the LivingEntityData layer.
Sourcepub fn living_entity_mut(&mut self) -> &mut LivingEntityData
pub fn living_entity_mut(&mut self) -> &mut LivingEntityData
Returns the mutable LivingEntityData layer.
Sourcepub fn base(&self) -> &BaseEntityData
pub fn base(&self) -> &BaseEntityData
Returns the BaseEntityData layer.
Sourcepub fn base_mut(&mut self) -> &mut BaseEntityData
pub fn base_mut(&mut self) -> &mut BaseEntityData
Returns the mutable BaseEntityData layer.
Sourcepub fn pack_dirty(&mut self) -> Option<Vec<DataValue>>
pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>>
Pack all dirty values for network sync, clearing dirty flags.
Returns None if no values are dirty.
fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>)
Sourcepub fn pack_all(&self) -> Vec<DataValue>
pub fn pack_all(&self) -> Vec<DataValue>
Pack all non-default values (for initial entity spawn).
fn pack_all_into(&self, values: &mut Vec<DataValue>)
Trait Implementations§
Source§impl Clone for PlayerEntityData
impl Clone for PlayerEntityData
Source§fn clone(&self) -> PlayerEntityData
fn clone(&self) -> PlayerEntityData
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 moreSource§impl Debug for PlayerEntityData
impl Debug for PlayerEntityData
Source§impl Default for PlayerEntityData
impl Default for PlayerEntityData
Source§impl VanillaEntityData for PlayerEntityData
impl VanillaEntityData for PlayerEntityData
Source§fn base(&self) -> &BaseEntityData
fn base(&self) -> &BaseEntityData
Returns the shared vanilla base entity-data layer.
Source§fn base_mut(&mut self) -> &mut BaseEntityData
fn base_mut(&mut self) -> &mut BaseEntityData
Returns the mutable shared vanilla base entity-data layer.
Source§impl VanillaLivingEntityData for PlayerEntityData
impl VanillaLivingEntityData for PlayerEntityData
Source§fn living_entity(&self) -> &LivingEntityData
fn living_entity(&self) -> &LivingEntityData
Returns the vanilla living entity-data layer.
Source§fn living_entity_mut(&mut self) -> &mut LivingEntityData
fn living_entity_mut(&mut self) -> &mut LivingEntityData
Returns the mutable vanilla living entity-data layer.
Auto Trait Implementations§
impl Freeze for PlayerEntityData
impl RefUnwindSafe for PlayerEntityData
impl Send for PlayerEntityData
impl Sync for PlayerEntityData
impl Unpin for PlayerEntityData
impl UnsafeUnpin for PlayerEntityData
impl UnwindSafe for PlayerEntityData
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