Single module modding

This commit is contained in:
2026-11-14 12:18:41 -03:00
parent 605008f584
commit 313098892e
134 changed files with 919 additions and 924 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ ctx.components.register_block("copper_tools:shaft", {
changes often doesn't resend the others, and setting a field to what it already is sends nothing.
- `undefined` removes a field. All of them go when the block is broken or replaced.
- It's saved with the world. `get_client_data` and `set_client_data` copy the value, so change it by setting it again.
- Client scripts read it with `ctx.world.get_client_data<T>(x, y, z, field)`, see [GUI](../gui/index.md). A block's
- Client phases read it with `ctx.world.get_client_data<T>(x, y, z, field)`, see [GUI](../gui/index.md). A block's
[visual](visuals.md) reads it with `block.get_client_data`, and its `update` is called when a field changes.
Like NeoForge's `getUpdateTag`, but per field. Keep it to what clients need to draw the block: everything in it is sent
@@ -92,7 +92,7 @@ A block with `item_display` draws one item lying on top of it, like the food on
"item_display": { "surface": 1 }
```
`surface` is the height in pixels the item lies at, 0 to 16. The server script sets the item:
`surface` is the height in pixels the item lies at, 0 to 16. The server phase sets the item:
```ts
ctx.world.set_block_item(x, y, z, { id: "bworld:cabbage", count: 1 });