[minor_change] Use "fuseView" for stacked dimension portal in nether.
SaberShip opened this issue ยท 2 comments
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.
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:
After that, the portal is much harder to see through the unloaded chunks:
Only when flying and generating new chunks quickly does the portal appear as the dark obsidian at the bottom overworld of chunks:
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.