MobEffectFogEnvironment .java

net.minecraft.client.renderer.fog.environment.MobEffectFogEnvironment (class): members: modifiesDarkness, providesColor, getMobEffect, isApplicable.

net.minecraft.client.renderer.fog.environmentclass31 linesclientextends FogEnvironment875 B

API Surface (3)

boolean providesColor()
boolean modifiesDarkness()
boolean isApplicable(final @Nullable FogType fogType, final Entity entity)

Code Graph: Dependencies (6)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

MobEffectFogEnvironment.java31 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.fog.environment;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.core.Holder;
6
import net.minecraft.world.effect.MobEffect;
7
import net.minecraft.world.entity.Entity;
8
import net.minecraft.world.entity.LivingEntity;
9
import net.minecraft.world.level.material.FogType;
10
import org.jspecify.annotations.Nullable;
11
12
@Environment(EnvType.CLIENT)
13
public abstract class MobEffectFogEnvironment extends FogEnvironment {
14
	public abstract Holder<MobEffect> getMobEffect();
15
16
	@Override
17
	public boolean providesColor() {
18
		return false;
19
	}
20
21
	@Override
22
	public boolean modifiesDarkness() {
23
		return true;
24
	}
25
26
	@Override
27
	public boolean isApplicable(final @Nullable FogType fogType, final Entity entity) {
28
		return entity instanceof LivingEntity livingEntity && livingEntity.hasEffect(this.getMobEffect());
29
	}
30
}
31

Decompiled Minecraft 26.3 source of MobEffectFogEnvironment (net/minecraft/client/renderer/fog/environment/MobEffectFogEnvironment.java) with Mojang official mappings, stored verbatim on the site.