map 0 to 65536

This commit is contained in:
Leijurv 2018-08-26 12:54:01 -07:00
parent 68c2537d20
commit f052c91cda
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -239,6 +239,10 @@ public final class CachedRegion implements IBlockTypeAccess {
List<BlockPos> locs = new ArrayList<>();
location[x][z].put(blockName, locs);
int numLocations = in.readShort() & 0xffff;
if (numLocations == 0) {
// an entire chunk full of air can happen in the end
numLocations = 65536;
}
for (int j = 0; j < numLocations; j++) {
byte xz = in.readByte();
int X = xz & 0x0f;