New hooks
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user