Jester stomp sounds, not step !

This commit is contained in:
2026-11-22 11:08:36 -03:00
parent 8add5f852e
commit dfb110e0f8
11 changed files with 50 additions and 12 deletions
+9 -1
View File
@@ -67,7 +67,15 @@ block, and `check-mods` reports a block or entity whose `sounds` has none of its
The player breaking or placing a block hears it right away from their own client, and everyone else from the server.
Players step with the blocks they walk on, except the one playing while they sneak or fly. Anything about a mob that
depends on what it's doing is its scripts' to play, see [From the Server](#from-the-server) and
[Lasting Sounds](#lasting-sounds).
[Lasting Sounds](#lasting-sounds). A mob whose steps change with what it's doing gets them from its animator's
`step_sound`, which says the sound each step makes, or `undefined` for the block's step:
```ts
ctx.render.register_entity_animator("my_mod:walker", (walker) => ({
pose(pose, time) {/* ... */},
step_sound: () => walker.get_client_data("angry") ? "my_mod:walker/stomp" : undefined,
}));
```
## Playing Sounds