fix issue with subchunk servers being labelled as empty

This commit is contained in:
olebeck 2023-03-11 16:50:54 +01:00
parent 8b763cde79
commit 006f604436
1 changed files with 3 additions and 6 deletions

View File

@ -53,18 +53,15 @@ func (w *WorldState) processLevelChunk(pk *packet.LevelChunk) {
break
}
}
if empty {
return
}
w.chunks[pk.Position] = ch
if pk.SubChunkRequestMode == protocol.SubChunkRequestModeLegacy {
w.mapUI.SetChunk(pk.Position, ch)
if !empty {
w.mapUI.SetChunk(pk.Position, ch)
}
} else {
w.mapUI.SetChunk(pk.Position, nil)
// request all the subchunks
max := w.Dim.Range().Height() / 16
if pk.SubChunkRequestMode == protocol.SubChunkRequestModeLimited {
max = int(pk.HighestSubChunk)