2025-11-24 22:52:51 +03:00

38 lines
1.0 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* org.jspecify.annotations.Nullable
*/
package net.minecraft.client.renderer.fog.environment;
import net.minecraft.client.renderer.fog.environment.FogEnvironment;
import net.minecraft.core.Holder;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.material.FogType;
import org.jspecify.annotations.Nullable;
public abstract class MobEffectFogEnvironment
extends FogEnvironment {
public abstract Holder<MobEffect> getMobEffect();
@Override
public boolean providesColor() {
return false;
}
@Override
public boolean modifiesDarkness() {
return true;
}
@Override
public boolean isApplicable(@Nullable FogType fogType, Entity entity) {
LivingEntity livingEntity;
return entity instanceof LivingEntity && (livingEntity = (LivingEntity)entity).hasEffect(this.getMobEffect());
}
}