ws-voxel: model/schematic (.schem v1-3, .schematic, .litematic read + write), codecs/model/Minecraft (block states, default colours, legacy ids, packed arrays)

Types change (backward compatible): Types.Voxels gains optional blocks (VoxelBlocks: exact block states as
u16 indices into a state palette, block entities, entities) and colors (exact u32 RGBA per cell).
This commit is contained in:
4DBug committed 2026-10-31 14:37:43 -05:00
1 parent 7fc5d3f5f0
commit fea56f4391
11 files changed
+524 -40

No files matched your search

+3 -3
View File
@@ -46,9 +46,9 @@ end
function Common.ints(v: any): { number }?
if Nbt.isTag(v) and v.type == "intArray" then
return v.value
elseif type(v) == "table" and not Nbt.isTag(v) and v[1] ~= nil then
local out = {}
for i, x in v do
elseif type(v) == "table" and not Nbt.isTag(v) and (v :: any)[1] ~= nil then
local out: { number } = {}
for i, x in v :: { any } do
out[i] = Nbt.number(x) or 0
end
return out