ldtteam / Structurize

Minecraft Structures
GNU General Public License v3.0
44 stars 45 forks source link

Fix fog setup inside level render events #640

Closed Nightenom closed 8 months ago

Nightenom commented 8 months ago

Changes proposed in this pull request:

Review please

uecasm commented 8 months ago

Hmm. Actually, it does only get called at one stage, so this code change has the effect of never calling that fog code at all, as far as I can tell.

In Structurlze, ClientEventSubscriber calls draw only at one of Stage.AFTER_CUTOUT_MIPPED_BLOCKS_BLOCKS or Stage.AFTER_TRANSLUCENT_BLOCKS depending on the translucency setting.

In MineColonies, WorldEventContext calls draw only at Stage.AFTER_CUTOUT_MIPPED_BLOCKS_BLOCKS. (Possibly it needs to similarly check the setting?)

So there is no case when the if blocks would be entered. which suggests either that the code could just be deleted entirely, or this isn't the intended fix.

Nightenom commented 8 months ago

Yeah, I know code I made :D end-users may currently render blueprints possibly at any stage (this renderer replicates entire LevelRenderer#renderLevel(...) method up to the most reproducible point, so it doesnt really care from which context it has been called)