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). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c908ed9ad7
commit
166f3f8eee
11 files changed
+524
-40
No files matched your search
@@ -119,6 +119,7 @@ def varints(idx):
|
||||
out.append(v)
|
||||
return bytes(out)
|
||||
def sponge(version, w, h, l, states, offset):
|
||||
states = list(dict.fromkeys(states))
|
||||
pal = {s: i for i, s in enumerate(states)}
|
||||
idx = [rng.randrange(len(states)) for _ in range(w * h * l)]
|
||||
data = ByteArray(np.frombuffer(varints(idx), dtype=np.int8))
|
||||
|
||||
Reference in new issue
Block a user