mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 15:07:36 +02:00
hollow-cube/lighting-join-patch (#56)
This commit is contained in:
parent
e2efdbb427
commit
010fe985bb
@ -165,6 +165,7 @@ public class LightingChunk extends DynamicChunk {
|
||||
|
||||
@Override
|
||||
protected LightData createLightData(boolean sendLater) {
|
||||
synchronized (lightCache) {
|
||||
BitSet skyMask = new BitSet();
|
||||
BitSet blockMask = new BitSet();
|
||||
BitSet emptySkyMask = new BitSet();
|
||||
@ -224,6 +225,7 @@ public class LightingChunk extends DynamicChunk {
|
||||
emptySkyMask, emptyBlockMask,
|
||||
skyLights, blockLights);
|
||||
}
|
||||
}
|
||||
|
||||
private static final LongSet queuedChunks = new LongOpenHashSet();
|
||||
private static final List<LightingChunk> sendQueue = new ArrayList<>();
|
||||
@ -412,10 +414,10 @@ public class LightingChunk extends DynamicChunk {
|
||||
Chunk c = instance.getChunk(chunkX, chunkZ);
|
||||
if (c == null) return;
|
||||
|
||||
synchronized (instance) {
|
||||
Set<Point> collected = collectRequiredNearby(instance, new Vec(chunkX, sectionY, chunkZ));
|
||||
// System.out.println("Calculating " + chunkX + " " + sectionY + " " + chunkZ + " | " + collected.size() + " | " + type);
|
||||
|
||||
synchronized (instance) {
|
||||
relight(instance, collected, type);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user