mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 06:07:31 +00:00
fix clients receiving invalid biome ID from server
This commit is contained in:
1 file changed
+2
-2
@@ -154,7 +154,7 @@ public class Hooks {
|
||||
|
||||
for (int i = 0; i < 256; ++i) {
|
||||
byteArray[i] = (byte) (shortArray[i] & 255);
|
||||
byteArray[i + 256] = (byte) (shortArray[i] >>> 8);
|
||||
byteArray[i + 256] = (byte) ((shortArray[i] >>> 8) & 255);
|
||||
}
|
||||
return byteArray;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class Hooks {
|
||||
short[] shortArray = new short[256];
|
||||
|
||||
for (int i = 0; i < 256; ++i) {
|
||||
shortArray[i] = (short) (byteArray[i + 256] << 8 | byteArray[i]);
|
||||
shortArray[i] = (short) (((byteArray[i + 256] << 8) & 255) | (byteArray[i] & 255));
|
||||
}
|
||||
|
||||
return shortArray;
|
||||
|
||||
Reference in new issue
Block a user