Neighbor Updates as a Queue

This commit is contained in:
2026-10-20 13:40:44 -03:00
parent 0af35d1e17
commit 77cd327f94
9 changed files with 348 additions and 138 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ 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. It runs the block's [`on_state_change`](components.md#changes) instead.
tile data. It runs the block's [`on_state_change`](components.md#changes) instead, and tells the blocks beside it,
unless it's given `{ update_neighbors: false }`.
## Variants