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§
Sourcefn pack_dirty(&self) -> Option<Vec<DataValue>>
fn pack_dirty(&self) -> Option<Vec<DataValue>>
Packs dirty values for network sync, clearing dirty flags.
Sourcefn is_no_gravity(&self) -> bool
fn is_no_gravity(&self) -> bool
Returns the shared vanilla NoGravity flag.
Sourcefn set_air_supply(&self, air_supply: i32)
fn set_air_supply(&self, air_supply: i32)
Sets synchronized vanilla air supply.
Sourcefn set_custom_name(&self, custom_name: Option<TextComponent>)
fn set_custom_name(&self, custom_name: Option<TextComponent>)
Sets synchronized vanilla custom name.
Sourcefn set_custom_name_visible(&self, visible: bool)
fn set_custom_name_visible(&self, visible: bool)
Sets synchronized vanilla custom-name visibility.
Sourcefn set_silent(&self, silent: bool)
fn set_silent(&self, silent: bool)
Sets synchronized vanilla silent flag.
Sourcefn set_no_gravity(&self, no_gravity: bool)
fn set_no_gravity(&self, no_gravity: bool)
Sets the shared vanilla NoGravity flag.
Sourcefn is_shift_key_down(&self) -> bool
fn is_shift_key_down(&self) -> bool
Returns the shared vanilla shift-key-down flag.
Sourcefn is_swimming(&self) -> bool
fn is_swimming(&self) -> bool
Returns the shared vanilla swimming flag.
Sourcefn is_base_invisible_flag(&self) -> bool
fn is_base_invisible_flag(&self) -> bool
Returns the shared vanilla invisible flag.
Sourcefn set_shift_key_down(&self, shift_key_down: bool)
fn set_shift_key_down(&self, shift_key_down: bool)
Sets the shared vanilla shift-key-down flag.
Sourcefn set_swimming(&self, swimming: bool)
fn set_swimming(&self, swimming: bool)
Sets the shared vanilla swimming flag.
Sourcefn set_sprinting(&self, sprinting: bool)
fn set_sprinting(&self, sprinting: bool)
Sets the shared vanilla sprinting flag.
Sourcefn set_fall_flying(&self, fall_flying: bool)
fn set_fall_flying(&self, fall_flying: bool)
Sets the shared vanilla fall-flying flag.
Sourcefn set_base_on_fire_flag(&self, on_fire: bool)
fn set_base_on_fire_flag(&self, on_fire: bool)
Sets the shared vanilla on-fire flag.
Sourcefn set_base_invisible_flag(&self, invisible: bool)
fn set_base_invisible_flag(&self, invisible: bool)
Sets the shared vanilla invisible flag.
Sourcefn set_base_glowing_flag(&self, glowing: bool)
fn set_base_glowing_flag(&self, glowing: bool)
Sets the shared vanilla glowing flag.
Sourcefn set_base_ticks_frozen(&self, ticks_frozen: i32)
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".