1
0
mirror of https://github.com/Minestom/Minestom.git synced 2025-02-03 22:12:20 +01:00

try finnaly unlock LightingChunk#createLightData ()

This commit is contained in:
Spliterash 2025-01-24 20:59:26 +03:00 committed by GitHub
parent b1c827e9c5
commit e525fe523a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,14 +241,13 @@ public class LightingChunk extends DynamicChunk {
@Override
protected LightData createLightData(boolean requiredFullChunk) {
packetGenerationLock.lock();
try {
if (requiredFullChunk) {
if (fullLightData != null) {
packetGenerationLock.unlock();
return fullLightData;
}
} else {
if (partialLightData != null) {
packetGenerationLock.unlock();
return partialLightData;
}
}
@ -329,9 +328,11 @@ public class LightingChunk extends DynamicChunk {
this.partialLightData = lightData;
}
packetGenerationLock.unlock();
return lightData;
} finally {
packetGenerationLock.unlock();
}
}
@Override