mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
Merge pull request #659 from eliotbyte/feature/block-placement
Feature/block placement
This commit is contained in:
commit
626a08b9d2
10 changed files with 748 additions and 428 deletions
|
|
@ -427,6 +427,22 @@ Where:
|
|||
- point_a, point_b - vec3, vec3 positions of the start and end of the tunnel.
|
||||
- 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
|
||||
|
||||
```lua
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue