implement structures rotation

This commit is contained in:
MihailRis
2024-09-22 01:58:59 +03:00
parent 001b930212
commit 74ded5a052
7 changed files with 67 additions and 14 deletions
+3 -2
View File
@@ -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