This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ChunkBlockPos( | |
| val x: Int, | |
| val y: Int, | |
| val z: Int | |
| ) { | |
| companion object { | |
| // Minecraft Y offset to make all values positive | |
| private const val Y_OFFSET = 64 | |
| private const val Y_SPLIT = 128 // Or configure based on your needs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BitBuffer { | |
| private var bytes: ByteArray | |
| private var sizeBytes = 0 | |
| private var currentByte = 0 | |
| private var bitPos = 0 // 0..7 within currentByte | |
| private var readByteIndex = 0 | |
| private var readBitPos = 0 | |
| constructor(initialCapacity: Int = 32) { |