pub struct Living {Show 14 fields
pub artificial: bool,
pub health: u16,
pub hurt_last_damage: u16,
pub hurt_time: u16,
pub attack_time: u16,
pub death_time: u16,
pub accel_strafing: f32,
pub accel_forward: f32,
pub yaw_velocity: f32,
pub jumping: bool,
pub look_target: Option<LookTarget>,
pub attack_target: Option<u32>,
pub path: Option<Path>,
pub wander_time: u16,
}Expand description
The data common to all living entities.
Fields§
§artificial: boolSet to true if an entity is artificial, as opposed to natural. If not artificial, an entity is despawned when too far from the closest player (maximum distance of 128.0 blocks).
health: u16The health.
hurt_last_damage: u16The last damage inflicted to the entity during hurt_time, this is used to only
damage for the maximum damage inflicted while hurt_time is not zero.
hurt_time: u16Hurt countdown, read hurt_damage documentation.
attack_time: u16TBD.
death_time: u16The death timer, increasing each tick when no health, after 20 ticks the entity is definitely removed from the world.
accel_strafing: f32The strafing acceleration.
accel_forward: f32The forward acceleration.
yaw_velocity: f32Velocity of the look’s yaw axis.
jumping: boolTrue if this entity is trying to jump.
look_target: Option<LookTarget>If this entity is looking at another one.
attack_target: Option<u32>If this entity is attacking another one.
path: Option<Path>The path this creature needs to follow.
wander_time: u16This timer is used on entities that are wandering too far from players or that take hurt damages. This is only used on entities that are AI ticked and on non persistent living entities. When this time reaches 600 and there are players in the 128.0 block distance, then this entity has 1/800 chance of despawning.