Struct entmet_lib::entities::entity::Entity
source · pub struct Entity {
pub status: Mask<EntityState>,
pub air_ticks: i32,
pub custom_name: Option<TextComponent>,
pub custom_name_visible: bool,
pub silent: bool,
pub no_gravity: bool,
pub pose: PoseEnum,
pub ticks_frozen_in_powdered_snow: i32,
}Expand description
An struct for a basic Entity
Fields§
§status: Mask<EntityState>The states of the entity
air_ticks: i32The amount of ticks in the air
custom_name: Option<TextComponent>The optional custom name of the entity
custom_name_visible: boolWhether the custom name of the entity is visible
silent: boolWether the entity is silent or not
no_gravity: boolWether gravity applies to the entity or not
pose: PoseEnumThe pose of the enum
ticks_frozen_in_powdered_snow: i32The amount of ticks that the entity is freezing in powdered snow
Implementations§
source§impl Entity
impl Entity
sourcepub fn new(
status: Mask<EntityState>,
air_ticks: i32,
custom_name: Option<TextComponent>,
custom_name_visible: bool,
silent: bool,
no_gravity: bool,
pose: PoseEnum,
ticks_frozen_in_powdered_snow: i32
) -> Self
pub fn new( status: Mask<EntityState>, air_ticks: i32, custom_name: Option<TextComponent>, custom_name_visible: bool, silent: bool, no_gravity: bool, pose: PoseEnum, ticks_frozen_in_powdered_snow: i32 ) -> Self
Function to create a new instance of Entity
§Arguments
status - An instance of Mask holding EntityState, storing the states of the entity
air_ticks - The amount of ticks in the air
custom_name - Optional custom name of the entity
custom_name_visible - Whether the custom name should be visible
silent - Whether the entity is silent or not
no_gravity - Whether gravity should apply to the entity or not
pose - The pose of the entity
tickts_frozen_in_powdered_snow - The amount that the player is freezing in powdered snow