Skip to main content

Module living_base

Module living_base 

Source
Expand description

Shared fields for all living entities.

Mirrors the runtime fields that vanilla defines on LivingEntity (and Entity for invulnerableTime). Entities that implement LivingEntity embed this struct and expose it via LivingEntity::living_base(), just like EntityBase is used for core Entity fields.

Structsยง

EquipmentAttributeModifierKey ๐Ÿ”’
LivingEntityBase
Common runtime fields shared by all living entities.
LivingEntityState ๐Ÿ”’
LivingRotationState
Vanilla living-entity body/head rotation state.
LivingSwingState
Vanilla arm-swing animation state stored on LivingEntity.
LivingTravelInput
Movement input stored on vanilla LivingEntity.
MobEffectDisplayState
Synchronized living entity-data values derived from active mob effects.
MobEffectInstance
Runtime mob-effect state.

Enumsยง

MobEffectSyncChange
A queued mob-effect packet change produced by living effect state.
MobEffectSyncPacket
Concrete mob-effect packet ready to send to a player connection.
MobEffectTickResult ๐Ÿ”’

Constantsยง

DEATH_DURATION
Duration in ticks of the death animation before entity removal.
DEFAULT_SWING_DURATION
Vanilla default SwingAnimation duration in ticks.
INFINITE_EFFECT_DURATION ๐Ÿ”’
MAX_EFFECT_AMPLIFIER ๐Ÿ”’
MIN_EFFECT_AMPLIFIER ๐Ÿ”’
POST_IMPULSE_GRACE_TICKS ๐Ÿ”’
SPRINT_SPEED_MODIFIER_AMOUNT ๐Ÿ”’

Functionsยง

clamp_effect_amplifier ๐Ÿ”’
living_entity_from_weak ๐Ÿ”’
living_is_dead ๐Ÿ”’
weak_living_entity ๐Ÿ”’

Type Aliasesยง

ActiveMobEffect
Active mob-effect state stored on a living entity.