Hand crank and shafts

This commit is contained in:
2026-10-15 11:45:12 -03:00
parent cedc7725b5
commit a0596ed0ef
27 changed files with 1008 additions and 36 deletions
+3 -1
View File
@@ -22,7 +22,9 @@ ctx.components.register_block("copper_tools:counter", {
});
```
Outside a handler, `ctx.world.get_block_data<T>(x, y, z)` reads it.
Outside a handler, `ctx.world.get_block_data<T>(x, y, z)` reads it. To change another block's data, like a shaft passing
its speed to the next one, `ctx.world.get_block_ref(x, y, z)` gives that block the way its own handlers get it, like
Minecraft's `getBlockEntity`, or `undefined` for air.
- Tile data is saved with the world, and goes away when the block is broken or replaced.
- It's **never sent to clients**. To show it to a player, give it [client data](#client-data), open a