diff --git a/server/world/chunk/encoding.go b/server/world/chunk/encoding.go index 63d26ef68..ac0b433c7 100644 --- a/server/world/chunk/encoding.go +++ b/server/world/chunk/encoding.go @@ -68,7 +68,7 @@ func (blockPaletteEncoding) decode(buf *bytes.Buffer) (uint32, error) { version, _ := m["version"].(int32) // Now check for a state field. - stateI, _ := m["states"] + stateI, ok := m["states"] if version < 17694723 { // This entry is a pre-1.13 block state, so decode the meta value instead. meta, _ := m["val"].(int16) @@ -83,7 +83,7 @@ func (blockPaletteEncoding) decode(buf *bytes.Buffer) (uint32, error) { name = state.Name stateI = state.State version = state.Version - } else if stateI == nil { + } else if !ok { // The state is a post-1.13 block state, but the states field is missing, likely due to a broken world // conversion. stateI = make(map[string]any)