map 0 to 65536
This commit is contained in:
parent
68c2537d20
commit
f052c91cda
@ -239,6 +239,10 @@ public final class CachedRegion implements IBlockTypeAccess {
|
|||||||
List<BlockPos> locs = new ArrayList<>();
|
List<BlockPos> locs = new ArrayList<>();
|
||||||
location[x][z].put(blockName, locs);
|
location[x][z].put(blockName, locs);
|
||||||
int numLocations = in.readShort() & 0xffff;
|
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++) {
|
for (int j = 0; j < numLocations; j++) {
|
||||||
byte xz = in.readByte();
|
byte xz = in.readByte();
|
||||||
int X = xz & 0x0f;
|
int X = xz & 0x0f;
|
||||||
|
Loading…
Reference in New Issue
Block a user