change: Fixed some tests and alternate implementations

This commit is contained in:
Nicholas Novak committed 2023-11-18 19:47:09 -08:00
1 parent 70879ec312
commit 42cad2cecc
4 files changed
+58 -12

No files matched your search

+8
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