mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-03 22:12:20 +01:00
try finnaly unlock LightingChunk#createLightData (#2626)
This commit is contained in:
parent
b1c827e9c5
commit
e525fe523a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user