mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 10:55:01 -04:00
fix chunk reading in < 1.16
This commit is contained in:
parent
bda742f7f4
commit
6ba46c00c7
@ -43,7 +43,7 @@ class ArrayPaletteData(
|
|||||||
|
|
||||||
override operator fun get(index: Int): Int {
|
override operator fun get(index: Int): Int {
|
||||||
val blockId: Long = if (versionId < LONG_BIT_SPLITTING_VERSION) {
|
val blockId: Long = if (versionId < LONG_BIT_SPLITTING_VERSION) {
|
||||||
val startLong = index * valuesPerLong
|
val startLong = index * elementBits / Long.SIZE_BITS
|
||||||
val startOffset = index * elementBits % Long.SIZE_BITS
|
val startOffset = index * elementBits % Long.SIZE_BITS
|
||||||
val endLong = ((index + 1) * elementBits - 1) / Long.SIZE_BITS
|
val endLong = ((index + 1) * elementBits - 1) / Long.SIZE_BITS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user