Skip to main content

EntitySyncedData

Trait EntitySyncedData 

Source
pub trait EntitySyncedData: Send + Sync {
Show 20 methods // Required methods fn pack_dirty(&self) -> Option<Vec<DataValue>>; fn pack_all(&self) -> Vec<DataValue>; fn is_no_gravity(&self) -> bool; fn set_air_supply(&self, air_supply: i32); fn set_custom_name(&self, custom_name: Option<TextComponent>); fn set_custom_name_visible(&self, visible: bool); fn set_silent(&self, silent: bool); fn set_no_gravity(&self, no_gravity: bool); fn set_pose(&self, pose: EntityPose); fn is_shift_key_down(&self) -> bool; fn is_swimming(&self) -> bool; fn is_base_invisible_flag(&self) -> bool; fn set_shift_key_down(&self, shift_key_down: bool); fn set_swimming(&self, swimming: bool); fn set_sprinting(&self, sprinting: bool); fn set_fall_flying(&self, fall_flying: bool); fn set_base_on_fire_flag(&self, on_fire: bool); fn set_base_invisible_flag(&self, invisible: bool); fn set_base_glowing_flag(&self, glowing: bool); fn set_base_ticks_frozen(&self, ticks_frozen: i32);
}
Expand description

Thread-safe access to an entity’s vanilla synchronized data.

Required Methods§

Source

fn pack_dirty(&self) -> Option<Vec<DataValue>>

Packs dirty values for network sync, clearing dirty flags.

Source

fn pack_all(&self) -> Vec<DataValue>

Packs all non-default values for initial entity spawn.

Source

fn is_no_gravity(&self) -> bool

Returns the shared vanilla NoGravity flag.

Source

fn set_air_supply(&self, air_supply: i32)

Sets synchronized vanilla air supply.

Source

fn set_custom_name(&self, custom_name: Option<TextComponent>)

Sets synchronized vanilla custom name.

Source

fn set_custom_name_visible(&self, visible: bool)

Sets synchronized vanilla custom-name visibility.

Source

fn set_silent(&self, silent: bool)

Sets synchronized vanilla silent flag.

Source

fn set_no_gravity(&self, no_gravity: bool)

Sets the shared vanilla NoGravity flag.

Source

fn set_pose(&self, pose: EntityPose)

Sets synchronized vanilla pose.

Source

fn is_shift_key_down(&self) -> bool

Returns the shared vanilla shift-key-down flag.

Source

fn is_swimming(&self) -> bool

Returns the shared vanilla swimming flag.

Source

fn is_base_invisible_flag(&self) -> bool

Returns the shared vanilla invisible flag.

Source

fn set_shift_key_down(&self, shift_key_down: bool)

Sets the shared vanilla shift-key-down flag.

Source

fn set_swimming(&self, swimming: bool)

Sets the shared vanilla swimming flag.

Source

fn set_sprinting(&self, sprinting: bool)

Sets the shared vanilla sprinting flag.

Source

fn set_fall_flying(&self, fall_flying: bool)

Sets the shared vanilla fall-flying flag.

Source

fn set_base_on_fire_flag(&self, on_fire: bool)

Sets the shared vanilla on-fire flag.

Source

fn set_base_invisible_flag(&self, invisible: bool)

Sets the shared vanilla invisible flag.

Source

fn set_base_glowing_flag(&self, glowing: bool)

Sets the shared vanilla glowing flag.

Source

fn set_base_ticks_frozen(&self, ticks_frozen: i32)

Sets synchronized vanilla frozen ticks.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> EntitySyncedData for SyncMutex<T>
where T: VanillaEntityData + Send + Sync,

Source§

fn pack_dirty(&self) -> Option<Vec<DataValue>>

Source§

fn pack_all(&self) -> Vec<DataValue>

Source§

fn is_no_gravity(&self) -> bool

Source§

fn set_air_supply(&self, air_supply: i32)

Source§

fn set_custom_name(&self, custom_name: Option<TextComponent>)

Source§

fn set_custom_name_visible(&self, visible: bool)

Source§

fn set_silent(&self, silent: bool)

Source§

fn set_no_gravity(&self, no_gravity: bool)

Source§

fn set_pose(&self, pose: EntityPose)

Source§

fn is_shift_key_down(&self) -> bool

Source§

fn is_swimming(&self) -> bool

Source§

fn is_base_invisible_flag(&self) -> bool

Source§

fn set_shift_key_down(&self, shift_key_down: bool)

Source§

fn set_swimming(&self, swimming: bool)

Source§

fn set_sprinting(&self, sprinting: bool)

Source§

fn set_fall_flying(&self, fall_flying: bool)

Source§

fn set_base_on_fire_flag(&self, on_fire: bool)

Source§

fn set_base_invisible_flag(&self, invisible: bool)

Source§

fn set_base_glowing_flag(&self, glowing: bool)

Source§

fn set_base_ticks_frozen(&self, ticks_frozen: i32)

Implementors§