Make players mobs too !
This commit is contained in:
@@ -41,8 +41,9 @@ and players. Mods define new kinds in their `entities/` folder, and draw them wi
|
||||
**Animals** (the default) are mobs: they wander around, panic when hurt, look at players now and then, swim up in water,
|
||||
and never despawn. They're saved with the world, and players can't place solid blocks where one is standing.
|
||||
|
||||
Players hit animals by left clicking them from up to 3 blocks away, for 1 physical damage (half a heart) whatever they
|
||||
hold. The hit pushes them away, and like any damage it can't hurt them again for half a second unless it's harder.
|
||||
Players hit animals, and each other, by left clicking them from up to 3 blocks away, for 1 physical damage (half a
|
||||
heart) whatever they hold. The hit pushes them away, and like any damage it can't hurt them again for half a second
|
||||
unless it's harder. See [Players](players.md#health-and-hunger).
|
||||
|
||||
**Scripted** entities stay exactly where a script puts them. They don't fall, think or get hurt, and aren't saved with
|
||||
the world, so a script never finds one it doesn't know about after a restart. The fishing hook is one:
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user