move IChunkWrapper.setUseDhLighting into DhLightingEngine

This commit is contained in:
James Seibel
2023-09-29 23:17:10 -05:00
parent b0f1a6e70d
commit 03d2d0c3a2
3 changed files with 2 additions and 2 deletions
@@ -194,7 +194,6 @@ public class ServerApi
{
// If MC's lighting engine isn't thread safe this may cause the server thread to lag
chunkWrapper.bakeDhLightingUsingMcLightingEngine();
chunkWrapper.setUseDhLighting(true);
}
catch (IllegalStateException e)
{
@@ -208,7 +207,6 @@ public class ServerApi
ArrayList<IChunkWrapper> nearbyChunkList = new ArrayList<>(1);
nearbyChunkList.add(chunkWrapper);
DhLightingEngine.INSTANCE.lightChunk(chunkWrapper, nearbyChunkList, level.hasSkyLight() ? 15 : 0);
chunkWrapper.setUseDhLighting(true);
}
dhLevel.updateChunkAsync(chunkWrapper);
@@ -198,6 +198,7 @@ public class DhLightingEngine
centerChunk.setIsDhLightCorrect(true);
centerChunk.setUseDhLighting(true);
LOGGER.trace("Finished generating lighting for chunk: [" + centerChunkPos + "]");
}
@@ -101,6 +101,7 @@ public interface IChunkWrapper extends IBindable
}
this.setIsDhLightCorrect(true);
this.setUseDhLighting(true);
}