Actually, we can re-enable this if we just make sure it applies to the correct level.

This commit is contained in:
Acuadragon100
2026-04-26 13:00:33 +02:00
parent 33e61b7ef0
commit b5ba7862a9
@@ -60,13 +60,11 @@ public class MixinClientPacketListener
return;
}
// Important to get the level from the chunk because the client level might be different if Immersive Portals is present.
ClientLevel level = (ClientLevel) chunk.getLevel();
executor.execute(() ->
{
// When Immersive Portals is present we might load a chunk from another level.
// This might cause LODs from another dimension to overwrite the LODs in the current dimension, which is generally undesirable.
if (chunk.getLevel() != this.level) return;
IClientLevelWrapper clientLevel = ClientLevelWrapper.getWrapper((ClientLevel) this.level);
IClientLevelWrapper clientLevel = ClientLevelWrapper.getWrapper(level);
SharedApi.INSTANCE.applyChunkUpdate(new ChunkWrapper(chunk, clientLevel), clientLevel);
});
}