Client-side mod. Underwater fog gets darker and closer the deeper you dive.
- Tracks camera Y vs.
sea_level(default 62). - Blend factor = (sea_level - camY) / max_depth, clamped 0..1 (default max depth 60).
- Fog color lerps from the vanilla water tint to
deep_color(near black). - Fog start/end lerp from vanilla values to
deep_fog_start/deep_fog_end. - Only applies while the camera is actually in water, so an air-filled sealed hull keeps normal visibility.
Config: config/depthfog-client.toml
Requires JDK 17. This folder has no Gradle wrapper (no jar can be bundled), so either:
- Copy
gradlew,gradlew.batand thegradle/folder from the official Forge 1.20.1 MDK (https://files.minecraftforge.net), then run./gradlew build, or - With Gradle 8.1.1+ installed:
gradle wrapper --gradle-version 8.1.1 && ./gradlew build
The jar ends up in build/libs/depthfog-1.0.0.jar. Drop it in mods/.
Test in dev with ./gradlew runClient.
- Create a new GitHub repo and upload this folder's contents (including the hidden
.githubfolder). - Open the Actions tab -> Build jar -> wait for the green check.
- Click the run, download the depthfog-jar artifact, unzip it, and put
depthfog-1.0.0.jarin your modpack'smods/folder.