mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
implement structures rotation
This commit is contained in:
parent
001b930212
commit
74ded5a052
7 changed files with 67 additions and 14 deletions
|
|
@ -77,7 +77,8 @@ function place_structures(x, z, w, d, seed, hmap)
|
|||
if py <= sea_level then
|
||||
goto continue
|
||||
end
|
||||
table.insert(placements, {math.floor(math.random() * 3), {px-8, py, pz-8}})
|
||||
table.insert(placements,
|
||||
{math.floor(math.random() * 3), {px-8, py, pz-8}, math.floor(math.random()*4)})
|
||||
::continue::
|
||||
end
|
||||
|
||||
|
|
@ -85,7 +86,7 @@ function place_structures(x, z, w, d, seed, hmap)
|
|||
local px = math.random() * w
|
||||
local pz = math.random() * d
|
||||
local py = hmap:at(px, pz) * 256
|
||||
table.insert(placements, {3, {px-8, py, pz-8}})
|
||||
table.insert(placements, {3, {px-8, py, pz-8}, 0})
|
||||
end
|
||||
return placements
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue