Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config for diving helmet scaling render distance #7917

Open
wants to merge 2 commits into
base: mc1.20.1/dev
Choose a base branch
from

Conversation

LTDigor
Copy link

@LTDigor LTDigor commented Mar 12, 2025

Add a configuration for disabling diving helmet fog rendering scale. It can be useful for Alex's Caves' abyssal chasm biome, where the main feature is a very low render distance.

Before:

2025-03-12_10 48 10

After:

2025-03-12_10 48 35

}
}
event.setCanceled(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event.setCanceled call shouldn’t be moved out of the ifs, as that would cancel the event even if Create doesn’t do anything, which will break other mods. (Including Alex’s Caves’ own fog rendering for its fluids)

@@ -322,17 +322,14 @@ public static void getFogDensity(ViewportEvent.RenderFog event) {

ItemStack divingHelmet = DivingHelmetItem.getWornItem(entity);
if (!divingHelmet.isEmpty()) {
if (FluidHelper.isWater(fluid)) {
if (FluidHelper.isWater(fluid) && AllConfigs.server().equipment.shouldScaleWaterFogDistance.get()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think this is a very elegant way of solving your issue, as the diving helmet’s increased visibility will now not work in normal ocean biomes if this config is set.

Why is this a server config?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose the config server, because the range of visibility is a gameplay element and an item property. I acted by analogy that if the subject had night vision, for example, I would take it to the config server.
If required, I will put it in the client config. But then in multiplayer, each player will have to turn off this property on their own.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that’s correct reasoning; but it should just be a biome tag instead as TropheusJ indicated.

@VoidLeech VoidLeech added the pr type: feature PR adds a new feature or changes an existing feature label Mar 12, 2025
@TropheusJ
Copy link
Collaborator

this should be controlled by a biome tag, not a config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr type: feature PR adds a new feature or changes an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants