File Details
Krypton Hybrid-forge-1.20.1-0.2.28.jar
- R
- Mar 7, 2026
- 8.31 MB
- 2.1K
- 1.20.1
- Forge + 1
File Name
Krypton Hybrid-forge-1.20.1-0.2.28.jar
Supported Versions
- 1.20.1
Curse Maven Snippet
Problem
*Each non-empty light section (DataLayer) is always serialized as a raw 2048-byte * nibble array, regardless of content. Sky-light sections above the surface are nearly * always uniform (all nibble values == 15, stored as 0xFF bytes). In a standard * overworld chunk with a view distance of 12, up to 20 such "all-max" sections can be * present, costing {@code 20 × 2048 = 40 960} bytes of redundant light payload per chunk * before connection-level compression.
* *Solution – Uniform-RLE light encoding
*When {@link KryptonConfig#lightOptEnabled} is {@code true} and net savings are * positive, the {@code write()} method is replaced with a Krypton-aware format * identified by a leading {@code 0x4B} ('K') marker byte:
** [0x4B] – Krypton marker (1 byte) * [trustEdges] – boolean * [skyYMask] – BitSet (FriendlyByteBuf.writeBitSet) * [blockYMask] – BitSet * [emptySkyYMask] – BitSet * [emptyBlockYMask]– BitSet * [skyCount] – VarInt * For each sky DataLayer: * [0x00] + 2048 bytes – raw encoding (fixed size; no VarInt prefix) * [0x01] + 1 byte – uniform encoding (all nibble pairs == byte) * [blockCount] – VarInt * For each block DataLayer: same as above *

