add equality checks and fuzz testing for chunk and storage data comparison

This commit is contained in:
adman
2026-05-03 18:34:21 +02:00
parent 5d3860b91e
commit aef9615476
6 changed files with 69 additions and 169 deletions
+13
View File
@@ -136,3 +136,16 @@ func SectionEncodePacket(w io.Writer, s Section) (err error) {
err = WriteSectionStorage(w, s.Biomes)
return
}
func SectionEquals(a, b Section) bool {
if a.BlockCount != b.BlockCount {
return false
}
if !a.Blocks.Equals(b.Blocks) {
return false
}
if !a.Biomes.Equals(b.Biomes) {
return false
}
return true
}