39 lines
1.2 KiB
Java
39 lines
1.2 KiB
Java
package net.minecraft.client.renderer.fog.environment;
|
|
|
|
import net.fabricmc.api.EnvType;
|
|
import net.fabricmc.api.Environment;
|
|
import net.minecraft.client.Camera;
|
|
import net.minecraft.client.DeltaTracker;
|
|
import net.minecraft.client.multiplayer.ClientLevel;
|
|
import net.minecraft.client.renderer.fog.FogData;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.world.entity.Entity;
|
|
import net.minecraft.world.entity.LivingEntity;
|
|
import net.minecraft.world.level.material.FogType;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
@Environment(EnvType.CLIENT)
|
|
public abstract class FogEnvironment {
|
|
public abstract void setupFog(FogData fogData, Entity entity, BlockPos pos, ClientLevel level, float renderDistance, DeltaTracker deltaTracker);
|
|
|
|
public boolean providesColor() {
|
|
return true;
|
|
}
|
|
|
|
public int getBaseColor(ClientLevel level, Camera camera, int renderDistance, float partialTick) {
|
|
return -1;
|
|
}
|
|
|
|
public boolean modifiesDarkness() {
|
|
return false;
|
|
}
|
|
|
|
public float getModifiedDarkness(LivingEntity entity, float darkness, float partialTick) {
|
|
return darkness;
|
|
}
|
|
|
|
public abstract boolean isApplicable(@Nullable FogType fogType, Entity entity);
|
|
|
|
public void onNotApplicable() {
|
|
}
|
|
}
|