file checks

This commit is contained in:
BuckarooBanzay 2022-12-19 08:23:01 +01:00
parent afd607c14d
commit 42cd70a862
2 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,7 @@ mtt.register("register and export", function(callback)
end)
mtt.register("serlize_chunk", function(callback)
mtt.register("serialize_chunk", function(callback)
local pos1 = { x=0, y=0, z=0 }
local pos2 = { x=20, y=20, z=20 }

View File

@ -5,6 +5,10 @@ local char, encode_uint16, insert = string.char, mapsync.encode_uint16, table.in
function mapsync.serialize_chunk(chunk_pos, filename)
local f = global_env.io.open(filename, "w")
if not f then
return false, "could not open '" .. filename .. "'"
end
local zip = mtzip.zip(f)
local blockdata_list = {}