diff --git a/common/block.go b/common/block.go index 1f87478..fa342e3 100644 --- a/common/block.go +++ b/common/block.go @@ -290,10 +290,10 @@ func (db *DecodedBlock) Content(x, y, z int) (content int32, found bool) { pos <<= 1 content = int32(db.MapContent[pos])<<8 | int32(db.MapContent[pos+1]) case db.Version >= 20: - if db.MapContent[pos] <= 0x80 { - content = int32(db.MapContent[pos]) + if c := db.MapContent[pos]; c <= 0x80 { + content = int32(c) } else { - content = int32(db.MapContent[pos])<<4 | int32(db.MapContent[pos+0x2000])>>4 + content = int32(c)<<4 | int32(db.MapContent[pos+0x2000])>>4 } default: return