Fix lighting when block is placed in same frame as chunk load

This commit is contained in:
Jonas Herzig
2021-12-08 16:22:06 +01:00
parent 59ac665c81
commit ad62e51ab3

View File

@@ -454,8 +454,14 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
//#if MC>=11400
if (p instanceof ChunkDataS2CPacket) {
Runnable doLightUpdates = () -> {
if (mc.world != null) {
LightingProvider provider = mc.world.getChunkManager().getLightingProvider();
ClientWorld world = mc.world;
if (world != null) {
//#if MC>=11800
//$$ while (!world.hasNoChunkUpdaters()) {
//$$ world.runQueuedChunkUpdates();
//$$ }
//#endif
LightingProvider provider = world.getChunkManager().getLightingProvider();
while (provider.hasUpdates()) {
provider.doLightUpdates(Integer.MAX_VALUE, true, true);
}