3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 13:52:50 +02:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2021-11-18 11:38:31 +01:00
Ursprung 2e5f3e4d66
Commit 782d7a2172
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -67,12 +67,17 @@ public final class WorldPackets {
handler(wrapper -> {
final int chunkX = wrapper.passthrough(Type.VAR_INT);
final int chunkZ = wrapper.passthrough(Type.VAR_INT);
if (wrapper.user().get(ChunkLightStorage.class).isLoaded(chunkX, chunkZ)) {
// Light packets updating already sent chunks are the same as before
return;
}
wrapper.cancel();
if (wrapper.user().get(ChunkLightStorage.class).isLoaded(chunkX, chunkZ)) {
if (!Via.getConfig().cache1_17Light()) {
// Light packets updating already sent chunks are the same as before
return;
}
// Pass through and cache light data
} else {
// Cancel and cache the light data
wrapper.cancel();
}
final boolean trustEdges = wrapper.read(Type.BOOLEAN);
final long[] skyLightMask = wrapper.read(Type.LONG_ARRAY_PRIMITIVE);