3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 22:02:50 +02:00

fix wrong order

Dieser Commit ist enthalten in:
creeper123123321 2018-10-24 19:25:33 -03:00
Ursprung a368f0babc
Commit 9cd40f3ec2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0AC57D54786721D1

Datei anzeigen

@ -51,21 +51,21 @@ public class WorldPackets {
}
blockLightMask |= (1 << (i + 1));
}
lightPacket.write(Type.VAR_INT, blockLightMask);
lightPacket.write(Type.VAR_INT, skyLightMask);
lightPacket.write(Type.VAR_INT, blockLightMask);
for (ChunkSection section : chunk.getSections()) {
if (section == null) continue;
if (section == null || !section.hasSkyLight()) continue;
ByteBuf buf = wrapper.user().getChannel().alloc().buffer();
section.writeBlockLight(buf);
section.writeSkyLight(buf);
byte[] data = new byte[buf.readableBytes()];
buf.readBytes(data);
buf.release();
lightPacket.write(Type.BYTE_ARRAY, Bytes.asList(data).toArray(new Byte[0]));
}
for (ChunkSection section : chunk.getSections()) {
if (section == null || !section.hasSkyLight()) continue;
if (section == null) continue;
ByteBuf buf = wrapper.user().getChannel().alloc().buffer();
section.writeSkyLight(buf);
section.writeBlockLight(buf);
byte[] data = new byte[buf.readableBytes()];
buf.readBytes(data);
buf.release();