mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
blocks.fill fix
This commit is contained in:
parent
e6ac30143c
commit
31a90bd911
1 changed files with 3 additions and 0 deletions
|
|
@ -133,6 +133,9 @@ console.add_command(
|
||||||
"Fill specified zone with blocks",
|
"Fill specified zone with blocks",
|
||||||
function(args, kwargs)
|
function(args, kwargs)
|
||||||
local name, x1,y1,z1, x2,y2,z2 = unpack(args)
|
local name, x1,y1,z1, x2,y2,z2 = unpack(args)
|
||||||
|
x1, x2 = math.min(x1, x2), math.max(x1, x2)
|
||||||
|
y1, y2 = math.min(y1, y2), math.max(y1, y2)
|
||||||
|
z1, z2 = math.min(z1, z2), math.max(z1, z2)
|
||||||
local id = block.index(name)
|
local id = block.index(name)
|
||||||
for y=y1,y2 do
|
for y=y1,y2 do
|
||||||
for z=z1,z2 do
|
for z=z1,z2 do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue