docs: add :block placement to world generator
This commit is contained in:
parent
9ccaecddd2
commit
3074836bcc
@ -427,6 +427,22 @@ Where:
|
|||||||
- point_a, point_b - vec3, vec3 positions of the start and end of the tunnel.
|
- point_a, point_b - vec3, vec3 positions of the start and end of the tunnel.
|
||||||
- radius - radius of the tunnel in blocks
|
- radius - radius of the tunnel in blocks
|
||||||
|
|
||||||
|
Single block:
|
||||||
|
```lua
|
||||||
|
{":block", block_id, position, [rotation], [priority]}
|
||||||
|
```
|
||||||
|
|
||||||
|
Where:
|
||||||
|
- block_id: numeric runtime id of the block to place.
|
||||||
|
- position: vec3 world position in blocks, relative to the current chunk start.
|
||||||
|
- rotation: 0–3, rotation around the Y axis. Default: 0. For extended blocks (size > 1), all segments use this rotation.
|
||||||
|
- priority: integer order. Higher values are placed later and overwrite lower‑priority placements.
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- `:block` automatically expands extended blocks into all their segments and replaces any voxels occupying those cells.
|
||||||
|
- Placement is chunk‑border safe: the engine distributes the placement to all affected chunk prototypes based on the block’s size/AABB.
|
||||||
|
- Use `:block` for single blocks; use `:line` for tunnels or continuous lines.
|
||||||
|
|
||||||
### Small structures placement
|
### Small structures placement
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
|
|||||||
@ -430,6 +430,22 @@ end
|
|||||||
- точка_а, точка_б - vec3, vec3 позиции начала и конца тоннеля.
|
- точка_а, точка_б - vec3, vec3 позиции начала и конца тоннеля.
|
||||||
- радиус - радиус тоннеля в блоках
|
- радиус - радиус тоннеля в блоках
|
||||||
|
|
||||||
|
Одиночный блок:
|
||||||
|
```lua
|
||||||
|
{":block", id_блока, позиция, [поворот], [приоритет]}
|
||||||
|
```
|
||||||
|
|
||||||
|
Где:
|
||||||
|
- id_блока: числовой runtime‑id блока, который нужно поставить.
|
||||||
|
- позиция: vec3 позиция в блоках относительно начала текущего чанка.
|
||||||
|
- поворот: 0–3, поворот вокруг оси Y. По умолчанию: 0. Для расширенных блоков (размер > 1) этот поворот применяется ко всем сегментам.
|
||||||
|
- приоритет: целое число. Бóльший приоритет ставится позже и перезаписывает более низкий.
|
||||||
|
|
||||||
|
Примечания:
|
||||||
|
- `:block` автоматически раскладывает расширенные блоки на сегменты и заменяет любые блоки в занимаемых ячейках.
|
||||||
|
- Размещение корректно работает на границах чанков: движок сам разносит плейсмент по затрагиваемым прототипам на основе размера/AABB блока.
|
||||||
|
- `:block` используйте для точечных блоков; `:line` — для туннелей/линий.
|
||||||
|
|
||||||
|
|
||||||
### Расстановка малых структур
|
### Расстановка малых структур
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user