Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
fix wrong order
Dieser Commit ist enthalten in:
Ursprung
a368f0babc
Commit
9cd40f3ec2
@ -51,21 +51,21 @@ public class WorldPackets {
|
|||||||
}
|
}
|
||||||
blockLightMask |= (1 << (i + 1));
|
blockLightMask |= (1 << (i + 1));
|
||||||
}
|
}
|
||||||
lightPacket.write(Type.VAR_INT, blockLightMask);
|
|
||||||
lightPacket.write(Type.VAR_INT, skyLightMask);
|
lightPacket.write(Type.VAR_INT, skyLightMask);
|
||||||
|
lightPacket.write(Type.VAR_INT, blockLightMask);
|
||||||
for (ChunkSection section : chunk.getSections()) {
|
for (ChunkSection section : chunk.getSections()) {
|
||||||
if (section == null) continue;
|
if (section == null || !section.hasSkyLight()) continue;
|
||||||
ByteBuf buf = wrapper.user().getChannel().alloc().buffer();
|
ByteBuf buf = wrapper.user().getChannel().alloc().buffer();
|
||||||
section.writeBlockLight(buf);
|
section.writeSkyLight(buf);
|
||||||
byte[] data = new byte[buf.readableBytes()];
|
byte[] data = new byte[buf.readableBytes()];
|
||||||
buf.readBytes(data);
|
buf.readBytes(data);
|
||||||
buf.release();
|
buf.release();
|
||||||
lightPacket.write(Type.BYTE_ARRAY, Bytes.asList(data).toArray(new Byte[0]));
|
lightPacket.write(Type.BYTE_ARRAY, Bytes.asList(data).toArray(new Byte[0]));
|
||||||
}
|
}
|
||||||
for (ChunkSection section : chunk.getSections()) {
|
for (ChunkSection section : chunk.getSections()) {
|
||||||
if (section == null || !section.hasSkyLight()) continue;
|
if (section == null) continue;
|
||||||
ByteBuf buf = wrapper.user().getChannel().alloc().buffer();
|
ByteBuf buf = wrapper.user().getChannel().alloc().buffer();
|
||||||
section.writeSkyLight(buf);
|
section.writeBlockLight(buf);
|
||||||
byte[] data = new byte[buf.readableBytes()];
|
byte[] data = new byte[buf.readableBytes()];
|
||||||
buf.readBytes(data);
|
buf.readBytes(data);
|
||||||
buf.release();
|
buf.release();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren