mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 00:17:58 +01:00
Merge pull request #277 from Kebab11noel/hardcoded-light-improvement
Remove block light data and send full sky data
This commit is contained in:
commit
539648684e
@ -417,22 +417,18 @@ public abstract class Chunk implements Viewable, Tickable, DataContainer {
|
|||||||
UpdateLightPacket updateLightPacket = new UpdateLightPacket(getIdentifier(), getLastChangeTime());
|
UpdateLightPacket updateLightPacket = new UpdateLightPacket(getIdentifier(), getLastChangeTime());
|
||||||
updateLightPacket.chunkX = getChunkX();
|
updateLightPacket.chunkX = getChunkX();
|
||||||
updateLightPacket.chunkZ = getChunkZ();
|
updateLightPacket.chunkZ = getChunkZ();
|
||||||
updateLightPacket.skyLightMask = 0x3FFF0;
|
updateLightPacket.skyLightMask = 0b111111111111111111;
|
||||||
updateLightPacket.blockLightMask = 0x3F;
|
updateLightPacket.emptySkyLightMask = 0b000000000000000000;
|
||||||
updateLightPacket.emptySkyLightMask = 0x0F;
|
updateLightPacket.blockLightMask = 0b000000000000000000;
|
||||||
updateLightPacket.emptyBlockLightMask = 0x3FFC0;
|
updateLightPacket.emptyBlockLightMask = 0b111111111111111111;
|
||||||
byte[] bytes = new byte[2048];
|
byte[] bytes = new byte[2048];
|
||||||
Arrays.fill(bytes, (byte) 0xFF);
|
Arrays.fill(bytes, (byte) 0xFF);
|
||||||
List<byte[]> temp = new ArrayList<>(14);
|
final List<byte[]> temp = new ArrayList<>(18);
|
||||||
List<byte[]> temp2 = new ArrayList<>(6);
|
for (int i = 0; i < 18; ++i) {
|
||||||
for (int i = 0; i < 14; ++i) {
|
|
||||||
temp.add(bytes);
|
temp.add(bytes);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 6; ++i) {
|
|
||||||
temp2.add(bytes);
|
|
||||||
}
|
|
||||||
updateLightPacket.skyLight = temp;
|
updateLightPacket.skyLight = temp;
|
||||||
updateLightPacket.blockLight = temp2;
|
updateLightPacket.blockLight = new ArrayList<>(0);
|
||||||
|
|
||||||
return updateLightPacket;
|
return updateLightPacket;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user