-
Notifications
You must be signed in to change notification settings - Fork 1
/
SLIME_FORMAT
61 lines (55 loc) · 2.09 KB
/
SLIME_FORMAT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-------------------------------------
“Slime” file format
2 bytes - magic = 0xB10B
// removed from Continued-Swofty-Manager: 1 byte (ubyte) - version, 1.8.8 = 0x01
// removed from Continued-Swofty-Manager: 1 byte (ubyte) - world version (see version list below)
2 bytes (short) - xPos of chunk lowest x & lowest z
2 bytes (short) - zPos
2 bytes (ushort) - width
2 bytes (ushort) - depth
[depends] - chunk bitmask
-> each chunk is 1 bit: 0 if all air (missing), 1 if present
-> chunks are ordered zx, meaning
-> the last byte has unused bits on the right
-> size is ceil((width*depth) / 8) bytes
4 bytes (int) - compressed chunks size
4 bytes (int) - uncompressed chunks size
<array of chunks> (size determined from bitmask)
compressed using zstd
4 bytes (int) - compressed tile entities size
4 bytes (int) - uncompressed tile entities size
<array of tile entity nbt compounds>
Same format as mc
inside an nbt list named “tiles”, in a global compound, no gzip anywhere
compressed using zstd
1 byte (boolean) - has entities
[if has entities]
4 bytes (int) compressed entities size
4 bytes (int) uncompressed entities size
<array of entity nbt compounds>
Same format as mc EXCEPT optional “CustomId”
inside an nbt list named “entities”, in a global compound
Compressed using zstd
4 bytes (int) - compressed “extra” size
4 bytes (int) - uncompressed “extra” size
[depends] - compound tag compressed using zstd
4 bytes (int) - compressed world maps size
4 bytes (int) - uncompressed world maps size
<array of tile entity nbt compounds>
Same format as mc, with a new "id" int tag
inside an nbt list named “maps”, in a global compound, no gzip anywhere
compressed using zstd
-------------------------------------
Custom chunk format
256 ints - heightmap
256 bytes - biomes
2 bytes - sections bitmask (bottom to top)
1 byte (boolean) - has block light
[if has block light]
2048 bytes - block light
4096 bytes - blocks
2048 bytes - data
1 byte (boolean) - has sky light
[if has sky light]
2048 bytes - sky light
For each section