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();
|
byte xz = in.readByte();
|
||||||
int X = xz & 0x0f;
|
int X = xz & 0x0f;
|
||||||
int Z = (xz >>> 4) & 0x0f;
|
int Z = (xz >>> 4) & 0x0f;
|
||||||
int Y = (int) in.readByte();
|
int Y = in.readByte() & 0xff;
|
||||||
if (Y < 0) {
|
|
||||||
Y += 256;
|
|
||||||
}
|
|
||||||
locs.add(new BlockPos(X, Y, Z));
|
locs.add(new BlockPos(X, Y, Z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,10 +33,7 @@ public class CachedRegionTest {
|
|||||||
byte xz = part1;
|
byte xz = part1;
|
||||||
int X = xz & 0x0f;
|
int X = xz & 0x0f;
|
||||||
int Z = (xz >>> 4) & 0x0f;
|
int Z = (xz >>> 4) & 0x0f;
|
||||||
int Y = (int) part2;
|
int Y = part2 & 0xff;
|
||||||
if (Y < 0) {
|
|
||||||
Y += 256;
|
|
||||||
}
|
|
||||||
if (x != X || y != Y || z != Z) {
|
if (x != X || y != Y || z != Z) {
|
||||||
System.out.println(x + " " + X + " " + y + " " + Y + " " + z + " " + Z);
|
System.out.println(x + " " + X + " " + y + " " + Y + " " + z + " " + Z);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user