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Β§

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

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.
HURT_DURATION_TICKS
Duration in ticks of the vanilla hurt animation.
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 πŸ”’
sync_dirty_mob_effects
Pushes newly dirty mob-effect state into a living entity’s synced data.
weak_living_entity πŸ”’

Type AliasesΒ§

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