Skip to content
satisfy edited this page Oct 21, 2026 · 1 revision

Fog (net.satisfy.foundation.client.fog)

Shared terrain fog for all mods. Every mod registers a source, Foundation picks the densest active fog and blends it in and out smoothly. Several mods with fog (snow, mist, swamps …) never overwrite each other.

Register a source (client init)

BiomeFog.register(MyMod.identifier("mist"), (level, cameraPos, renderDistance) -> {
    if (!MyConfig.mistFog() || !level.getBiome(cameraPos).is(MyBiomes.MISTY_FOREST)) {
        return null;
    }
    return new BiomeFog.Fog(renderDistance * 0.1F, renderDistance * 0.5F);
});
  • Return null for "no fog right now", or a BiomeFog.Fog(start, end) with distances in blocks.
  • Called once per client tick. renderDistance is the current render distance in blocks, handy for percentages.
  • The same id again replaces the source.

How it is blended

  • Of all active sources the one with the smallest end wins.
  • Fog fades in and out over about 3 seconds; when the target changes, start and end follow smoothly.
  • Fog never gets thinner than vanilla's: Foundation only lowers start and end.
  • Only terrain fog; under water, in lava or in powder snow vanilla fog stays.
  • Your config switch belongs in the source: return null when it is off.

Clone this wiki locally