New hooks

This commit is contained in:
2026-10-20 13:22:03 -03:00
parent c7a2392591
commit 0af35d1e17
7 changed files with 253 additions and 19 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ ctx.world.set_state(x, y, z, "age", age + 1);
`get_state` is `undefined` where there's no block, and `set_state` does nothing there and returns `false`. Both throw
for a state the block doesn't have, and `set_state` for a value that doesn't fit its bits. Changes are synced to
everyone who can see the block. Unlike `set_block`, it doesn't run `on_break` or `on_create`, and the block keeps its
tile data.
tile data. It runs the block's [`on_state_change`](components.md#changes) instead.
## Variants