Skip to content

Instantly share code, notes, and snippets.

View MrLarkyy's full-sized avatar
🏠
Working from home

Tadeáš Ganzwohl MrLarkyy

🏠
Working from home
View GitHub Profile
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
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) {