Block visuals
This commit is contained in:
@@ -76,7 +76,8 @@ 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).
|
||||
- Client scripts 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
|
||||
to every player near it.
|
||||
|
||||
Reference in New Issue
Block a user