Export schematics
This commit is contained in:
@@ -74,6 +74,7 @@ the block and the component.
|
||||
| `on_scheduled_tick(block, params)` | A tick it asked for comes. See [Scheduled Ticks](#scheduled-ticks). | |
|
||||
| `on_entity_stand(block, params, entity)` | An entity standing on it moves, every tick it does. See [Entities on It](#entities-on-it). | |
|
||||
| `fluid_handler(block, params, face?)` | Something reaches for its tanks from `face`. See [Fluid Handlers](../resources/fluids.md#fluid-handlers). | a `FluidHandler`, or `undefined` |
|
||||
| `export_data(block, params)` | It goes into a schematic. See [Schematics](../misc/schematics.md#block-data). | its data for the schematic |
|
||||
|
||||
`block` is `{ id, x, y, z, biome, season, data, get_client_data, set_client_data, set_ticking }`, where `data` is the
|
||||
block's [tile data](tiledata.md) and the client data functions its [part clients see](tiledata.md#client-data), `biome`
|
||||
|
||||
@@ -56,6 +56,9 @@ ctx.components.register_block("copper_tools:crate", {
|
||||
|
||||
The base game's `bworld:storage` does exactly this, see `mods/bworld/scripts/server.ts`.
|
||||
|
||||
The container's id means nothing outside the world, so a block like this should also have an `export_data` that writes
|
||||
its items in, for when it's saved into a [schematic](../misc/schematics.md#block-data).
|
||||
|
||||
## Client Data
|
||||
|
||||
Client data is the part of a block's data its clients see too, like how fast a shaft turns. It's kept by field, each any
|
||||
|
||||
Reference in New Issue
Block a user