Attempt to fix a rare concurrent lighting engine issue with ChunkWrapper.getBlockLightPosList()

This commit is contained in:
James Seibel
2023-12-09 16:18:17 -06:00
parent ed52efa72b
commit e787d7d317
@@ -374,8 +374,12 @@ public class ChunkWrapper implements IChunkWrapper
}
}
/**
* FIXME synchronized is necessary for a rare issue where this method is called from two separate threads at the same time
* before the list has finished populating.
*/
@Override
public ArrayList<DhBlockPos> getBlockLightPosList()
public synchronized ArrayList<DhBlockPos> getBlockLightPosList()
{
// only populate the list once
if (this.blockLightPosList == null)