refactor storage format and bpe handling; add redirecting bpe support and utility function for next largest number

This commit is contained in:
adman
2026-05-06 16:47:50 +02:00
parent be6d2fb461
commit c93d907d46
3 changed files with 26 additions and 21 deletions
+4 -3
View File
@@ -42,9 +42,10 @@ func MakeBiomeFormat(version string) StorageFormat {
func MakeBlockFormat(version string) StorageFormat {
directBpe := uint8(math.Ceil(math.Log2(float64(len(data.BlocksForVersion(version))))))
return StorageFormat{
AvailableBpes: []uint8{0, 4, 5, 6, 7, 8, directBpe},
BiggestDirect: true,
Len: BlocksPerChunkSection,
RedirectingBpes: []uint8{1, 2, 3},
AvailableBpes: []uint8{0, 4, 5, 6, 7, 8, directBpe},
BiggestDirect: true,
Len: BlocksPerChunkSection,
}
}