Fix IndexOutOfBounds exception, Major derp.
This commit is contained in:
parent
bea2d8599f
commit
f341fdfd61
2 changed files with 4 additions and 4 deletions
|
@ -5,9 +5,9 @@
|
||||||
var3 = 12288 * var2;
|
var3 = 12288 * var2;
|
||||||
|
|
||||||
+ int msb = 0; //BugFix: MC does not read the MSB array from the packet properly, causing issues for servers that use blocks > 256
|
+ int msb = 0; //BugFix: MC does not read the MSB array from the packet properly, causing issues for servers that use blocks > 256
|
||||||
+ for (var3 = 0; var3 < 16; ++var3)
|
+ for (int x = 0; x < 16; x++)
|
||||||
+ {
|
+ {
|
||||||
+ msb += this.yChMax >> var3 & 1;
|
+ msb += (yChMax >> x) & 1;
|
||||||
+ }
|
+ }
|
||||||
+ var3 += (2048 * msb);
|
+ var3 += (2048 * msb);
|
||||||
+
|
+
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
|
|
||||||
- var8 = 2048 * 5 * var7 + 256;
|
- var8 = 2048 * 5 * var7 + 256;
|
||||||
+ int msb = 0; //BugFix: MC does not read the MSB array from the packet properly, causing issues for servers that use blocks > 256
|
+ int msb = 0; //BugFix: MC does not read the MSB array from the packet properly, causing issues for servers that use blocks > 256
|
||||||
+ for (var8 = 0; var8 < 16; ++var8)
|
+ for (int x = 0; x < 16; x++)
|
||||||
+ {
|
+ {
|
||||||
+ msb += this.field_73588_b[var6] >> var8 & 1;
|
+ msb += (field_73588_b[var6] >> x) & 1;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ var8 = 2048 * 5 * var7 + (2048 * msb) + 256;
|
+ var8 = 2048 * 5 * var7 + (2048 * msb) + 256;
|
||||||
|
|
Loading…
Reference in a new issue