Fix lighting when block is placed in same frame as chunk load
This commit is contained in:
@@ -454,8 +454,14 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
|||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
if (p instanceof ChunkDataS2CPacket) {
|
if (p instanceof ChunkDataS2CPacket) {
|
||||||
Runnable doLightUpdates = () -> {
|
Runnable doLightUpdates = () -> {
|
||||||
if (mc.world != null) {
|
ClientWorld world = mc.world;
|
||||||
LightingProvider provider = mc.world.getChunkManager().getLightingProvider();
|
if (world != null) {
|
||||||
|
//#if MC>=11800
|
||||||
|
//$$ while (!world.hasNoChunkUpdaters()) {
|
||||||
|
//$$ world.runQueuedChunkUpdates();
|
||||||
|
//$$ }
|
||||||
|
//#endif
|
||||||
|
LightingProvider provider = world.getChunkManager().getLightingProvider();
|
||||||
while (provider.hasUpdates()) {
|
while (provider.hasUpdates()) {
|
||||||
provider.doLightUpdates(Integer.MAX_VALUE, true, true);
|
provider.doLightUpdates(Integer.MAX_VALUE, true, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user