This commit is contained in:
Crispy 2025-07-03 01:23:46 +02:00
parent 491112768c
commit 68ec37f994
66 changed files with 6591 additions and 10096 deletions

View file

@ -10,15 +10,15 @@ sf = require("structure")
function removechunks()
file = fs.open("tobuild","r")
lines = {}
counts = {}
line = file.readLine()
while line do
i = math.mod((i or 0)+1,100)
if i == 0 then sleep(0.05) end
xyz = stringtovec(line)
if not chunkisempty(xyz) then
table.insert(lines,line)
table.insert(counts,line)
print(line)
end
line = file.readLine()
@ -26,19 +26,19 @@ function removechunks()
file.close()
fs.delete("tobuildcopy")
file = fs.open("tobuildcopy","w")
for i,line in ipairs(lines) do
for i,line in ipairs(counts) do
file.writeLine(line)
print(line)
if math.mod(i,100) == 0 then sleep(0.05) end
end
file.close()
file.close()
end
function chunkisempty(vec)
x,y,z = vec.x,vec.y,vec.z
for w = 1,8 do
for h = 1,8 do
for d = 1,8 do
bool,block = sf.blockat(x+w,z+d,y+h)
bool,block = sf.blockat(x+w,z+d,y+h)
if bool then
print(block)
return false