Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Use readableBytes
Dieser Commit ist enthalten in:
Ursprung
4d16dbf76f
Commit
a51f347371
@ -55,13 +55,12 @@ public class Chunk1_13Type extends PartialType<Chunk, ClientWorld> {
|
|||||||
|
|
||||||
int[] biomeData = groundUp ? new int[256] : null;
|
int[] biomeData = groundUp ? new int[256] : null;
|
||||||
if (groundUp) {
|
if (groundUp) {
|
||||||
try {
|
if (data.readableBytes() >= 256 * 4) {
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
biomeData[i] = data.readInt();
|
biomeData[i] = data.readInt();
|
||||||
}
|
}
|
||||||
} catch (IndexOutOfBoundsException e) {
|
} else {
|
||||||
// Some plugin isn't sending biome data while groundUp is true, see #1312
|
Via.getPlatform().getLogger().log(Level.WARNING, "Chunk x="+ chunkX + " z=" + chunkZ + " doesn't have biome data!");
|
||||||
Via.getPlatform().getLogger().log(Level.WARNING, "IndexOutOfBoundsException while trying to read biome data", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren