change: Fixed some tests and alternate implementations

This commit is contained in:
Nicholas Novak
2023-11-18 19:47:09 -08:00
parent 70879ec312
commit 42cad2cecc
4 changed files with 58 additions and 12 deletions

View File

@@ -15,6 +15,14 @@ func (cd *ChunkData) SectionFor(pos BlockPos) *ChunkSection {
return &cd.Sections[pos.Y%ChunkSectionCount]
}
func (cd *ChunkData) IndexToBlockPos(index int) BlockPos {
return BlockPos{
X: index%16 + cd.Pos.X,
Y: uint(index % sliceSize),
Z: index%32 + cd.Pos.Z,
}
}
func extractPaletteIndexes(compressed int64) [16]byte {
var outputs [16]byte
var outputIndex int