Immersive Portals

Immersive Portals

5M Downloads

[minor_change] Use "fuseView" for stacked dimension portal in nether.

SaberShip opened this issue ยท 2 comments

commented

Tested On

Minecraft: 1.17.1 (Fabric)
immptl: 0.29
With and without Sodium 0.3.2 (No change)

Behavior

With dimension stack enabled, (Overworld <-> Nether) the overworld sky is visible through unloaded chunks in the nether.

Day:
Day

Night:
Night

Possible Fix:

If fuseView is enabled for the vertical connecting portal, then the sky is not rendered through unloaded chunks. I used NBTExplorer to quickly modify the test world by enabling fuseView in the global portal data:
NBT

After that, the portal is much harder to see through the unloaded chunks:
Day_Fuze

Only when flying and generating new chunks quickly does the portal appear as the dark obsidian at the bottom overworld of chunks:
Fuze

Looking at the code, AltiusInfo.java only sets fuzeView to true if the portal entity's world has skyLight:

public static void initializeFuseViewProperty(Portal portal) {
    if (portal.world.getDimension().hasSkyLight()) {
        if (portal.getNormal().y < 0) {
            portal.fuseView = true;
        }
    }
}

It may be good to consider the skylight of the world for both sides of the portal. I did not want to create a PR for this as I'm not entirely sure of the other purposes for fuseView and if there are any side effects I'm not seeing.

commented

ok I am going to change that.

commented

Fixed, will be in the next version.