mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Fix NPE in recheckGaps when using async lighting
This commit is contained in:
parent
f2f04fbb77
commit
d4bd87a7ec
@ -108,7 +108,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public static boolean haveWeSilencedAPhysicsCrash;
|
||||
public static String blockLocation;
|
||||
private int tileTickPosition;
|
||||
+ public ExecutorService lightingExecutor; // PaperSpigot - Asynchronous lighting updates
|
||||
+ public ExecutorService lightingExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("PaperSpigot - Lighting Thread").build()); // PaperSpigot - Asynchronous lighting updates
|
||||
|
||||
public static long chunkToKey(int x, int z)
|
||||
{
|
||||
@ -182,10 +182,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return this.c(enumskyblock, position, chunk, null);
|
||||
+ }
|
||||
+
|
||||
+ if (lightingExecutor == null) {
|
||||
+ lightingExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("PaperSpigot - Lighting Thread").build());
|
||||
+ }
|
||||
+
|
||||
+ chunk.pendingLightUpdates.incrementAndGet();
|
||||
+ chunk.lightUpdateTime = chunk.world.getTime();
|
||||
+
|
||||
|
@ -128,7 +128,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
public static String blockLocation;
|
||||
private int tileTickPosition;
|
||||
public ExecutorService lightingExecutor; // PaperSpigot - Asynchronous lighting updates
|
||||
public ExecutorService lightingExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("PaperSpigot - Lighting Thread").build()); // PaperSpigot - Asynchronous lighting updates
|
||||
+ public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<Explosion.CacheKey, Float>(); // PaperSpigot - Optimize explosions
|
||||
|
||||
public static long chunkToKey(int x, int z)
|
||||
|
Loading…
Reference in New Issue
Block a user