Undergarden mod !
This commit is contained in:
@@ -27,10 +27,11 @@ and players. Mods define new kinds in their `entities/` folder, and draw them wi
|
||||
| `id` | required | The entity's id. |
|
||||
| `texture` | required | Any texture, stretched over the model's `texture_width` and `texture_height`. |
|
||||
| `model` | none | An [entity model](#entity-models). Without one it's drawn as its texture, facing the camera. |
|
||||
| `behavior` | `"animal"` | `"animal"` or `"scripted"`, see below. |
|
||||
| `behavior` | `"animal"` | `"animal"`, `"monster"` or `"scripted"`, see below. |
|
||||
| `width`, `height` | required | Its collision box in blocks, up to 16. `width` is for both x and z. Its eyes are at 85% of the height. |
|
||||
| `max_health` | `10` | In half hearts. |
|
||||
| `movement_speed` | `0.25` | Minecraft's per tick speed, 0.25 for most animals. |
|
||||
| `attack_damage` | `2` | What a monster's hits do, in half hearts. |
|
||||
| `physical_shielding` | `0` | Protection from physical damage. Not used yet. |
|
||||
| `arcane_shielding` | `0` | Protection from arcane damage. Not used yet. |
|
||||
|
||||
@@ -45,6 +46,28 @@ Players hit animals, and each other, by left clicking them from up to 3 blocks 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).
|
||||
|
||||
**Monsters** go after the nearest player they can see within 16 blocks, and whoever last hurt them, before anyone else.
|
||||
They walk up and hit their target for `attack_damage` once a second, swinging their right arm. Otherwise they wander
|
||||
around and look about. Unlike animals, they go away when no player is near. The Rotwalker in `mods/undergarden` is one:
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": 1,
|
||||
"entity": {
|
||||
"id": "undergarden:rotwalker",
|
||||
"model": "undergarden:rotwalker",
|
||||
"texture": "undergarden:rotwalker",
|
||||
"behavior": "monster",
|
||||
"width": 0.8,
|
||||
"height": 2.5,
|
||||
"max_health": 40,
|
||||
"movement_speed": 0.23,
|
||||
"attack_damage": 5,
|
||||
"physical_shielding": 3
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**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:
|
||||
|
||||
@@ -97,7 +120,12 @@ get the id `<mod id>:<name>`. From the file's first geometry, bworld uses:
|
||||
Cubes need box UV: per face UV isn't supported. A bone's parent has to come before it. The model faces -z, 16 pixels to
|
||||
a block with its feet at 0, and shows the way Blockbench shows it.
|
||||
|
||||
Models don't animate yet. The whole model turns with the entity, and a bone named `head` turns to where it looks.
|
||||
There are no animation files yet. The whole model turns with the entity, and bones with Minecraft's humanoid names move
|
||||
on their own:
|
||||
|
||||
- `head` turns to where the entity looks.
|
||||
- `right_arm`, `left_arm`, `right_leg` and `left_leg` swing as it walks, each arm with the opposite leg.
|
||||
- `right_arm` also comes down when a monster attacks.
|
||||
|
||||
Without a model, the whole texture is drawn facing the camera, 16 pixels to a block, centered on the middle of the
|
||||
entity's box.
|
||||
|
||||
Reference in New Issue
Block a user