Make players mobs too !

This commit is contained in:
2026-09-30 10:42:52 -03:00
parent 65f27d6099
commit 4fbcca6851
23 changed files with 314 additions and 132 deletions
+4
View File
@@ -53,6 +53,10 @@ Players follow Minecraft's rules, with 20 health (10 hearts) and 20 hunger:
- **Starving**: at 0 hunger they lose health every 4 seconds, down to half a heart.
- **Falling** hurts 1 per block after the first 3, unless they land in water.
- **The void**: below the world, they keep taking damage until they die.
- **Fighting**: other players and mobs can hit them, which also pushes them away.
Players are living entities, like mobs, so damage works the same for both. After being hurt they can't be hurt again for
half a second, unless the new hit is harder, and then only by the difference.
`damage(amount, cause)` hurts them like anything else would. `cause` shows in the `player_damage` and `player_death`
[events](../concepts/events.md) and in the death message. Before events can change the amount or cancel it.