3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-25 15:50:10 +01:00

Use readableBytes

Dieser Commit ist enthalten in:
creeper123123321 2019-05-10 16:02:17 -03:00
Ursprung 4d16dbf76f
Commit a51f347371
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -55,13 +55,12 @@ public class Chunk1_13Type extends PartialType<Chunk, ClientWorld> {
int[] biomeData = groundUp ? new int[256] : null;
if (groundUp) {
try {
if (data.readableBytes() >= 256 * 4) {
for (int i = 0; i < 256; i++) {
biomeData[i] = data.readInt();
}
} catch (IndexOutOfBoundsException e) {
// Some plugin isn't sending biome data while groundUp is true, see #1312
Via.getPlatform().getLogger().log(Level.WARNING, "IndexOutOfBoundsException while trying to read biome data", e);
} else {
Via.getPlatform().getLogger().log(Level.WARNING, "Chunk x="+ chunkX + " z=" + chunkZ + " doesn't have biome data!");
}
}