Skip to main content

Module living_entity

Module living_entity 

Source

Constantsยง

BED_SLEEP_POSITION_OFFSET ๐Ÿ”’

Traitsยง

LivingEntity
A trait for living entities that can take damage, heal, and die.

Functionsยง

death_loot_items_with_rng ๐Ÿ”’
random_teleport_ground_y ๐Ÿ”’
Walks down from y until standing on a block that blocks motion, mirroring the descent loop in vanilla Entity.randomTeleport. Returns None if the worldโ€™s floor is reached without finding solid ground.
shearing_loot_items_with_rng ๐Ÿ”’
Runs vanilla LivingEntity.dropFromShearingLootTable for loot_table, returning the drops resolved with the vanilla shearing loot params (origin, entity, tool).