Placing schematics
This commit is contained in:
+8
-1
@@ -73,10 +73,17 @@ Blocks without the hooks just copy data unchanged, which is fine for plain field
|
||||
|
||||
### Placing schematics
|
||||
|
||||
Built without `import_data`, see `docs/modding/misc/schematics.md`:
|
||||
|
||||
```typescript
|
||||
ctx.schematics.place(id, { position, dimension, position_pivot, rotation, mirror });
|
||||
ctx.schematics.register(id, schematic);
|
||||
ctx.schematics.place(id, { position, position_pivot, rotation, mirror });
|
||||
```
|
||||
|
||||
`register` takes a `Schematic` object for now, loading them from mods' schematics directories isn't built. There's no
|
||||
`dimension` yet, like export. Blocks with data in the schematic get it as it is and skip `on_create`, the rest get their
|
||||
`on_create`, then every placed block tells its neighbors.
|
||||
|
||||
### Rotation and mirroring
|
||||
|
||||
- `rotation` is `0`, `90`, `180` or `270` degrees clockwise seen from above, the same as the `"y"` of a block variant
|
||||
|
||||
Reference in New Issue
Block a user