consistency between byte and short read methods
This commit is contained in:
parent
f052c91cda
commit
74916dd24e
@ -247,10 +247,7 @@ public final class CachedRegion implements IBlockTypeAccess {
|
||||
byte xz = in.readByte();
|
||||
int X = xz & 0x0f;
|
||||
int Z = (xz >>> 4) & 0x0f;
|
||||
int Y = (int) in.readByte();
|
||||
if (Y < 0) {
|
||||
Y += 256;
|
||||
}
|
||||
int Y = in.readByte() & 0xff;
|
||||
locs.add(new BlockPos(X, Y, Z));
|
||||
}
|
||||
}
|
||||
|
@ -33,10 +33,7 @@ public class CachedRegionTest {
|
||||
byte xz = part1;
|
||||
int X = xz & 0x0f;
|
||||
int Z = (xz >>> 4) & 0x0f;
|
||||
int Y = (int) part2;
|
||||
if (Y < 0) {
|
||||
Y += 256;
|
||||
}
|
||||
int Y = part2 & 0xff;
|
||||
if (x != X || y != Y || z != Z) {
|
||||
System.out.println(x + " " + X + " " + y + " " + Y + " " + z + " " + Z);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user