Krypton Hybrid-forge-1.20.1-0.2.28.jar
Curse Maven Snippet
What's new
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 *
This mod has no additional files

