Cleaned up
This commit is contained in:
@ -23,24 +23,25 @@ public abstract class BackgroundRendererMixin {
|
||||
|
||||
@Inject(method = "applyFog", at = @At("RETURN"), cancellable = true)
|
||||
private static void applyFog(Camera camera, BackgroundRenderer.FogType fogType, Vector4f color, float viewDistance, boolean thickenFog, float tickProgress, CallbackInfoReturnable<Fog> cir) {
|
||||
CameraSubmersionType submersion = camera.getSubmersionType();
|
||||
boolean renderFog = true;
|
||||
CameraSubmersionType subType = camera.getSubmersionType();
|
||||
if (subType == CameraSubmersionType.NONE) {
|
||||
World world = camera.getFocusedEntity().getWorld();
|
||||
if (world.getRegistryKey() == World.OVERWORLD && !getConfig().renderOverworldFog)
|
||||
renderFog = false;
|
||||
else if (world.getRegistryKey() == World.NETHER && !getConfig().renderNetherFog)
|
||||
renderFog = false;
|
||||
else if (world.getRegistryKey() == World.END && !getConfig().renderEndFog)
|
||||
renderFog = false;
|
||||
} else if (subType == CameraSubmersionType.WATER && !getConfig().renderWaterFog)
|
||||
renderFog = false;
|
||||
else if (subType == CameraSubmersionType.LAVA && !getConfig().renderLavaFog)
|
||||
renderFog = false;
|
||||
else if (subType == CameraSubmersionType.POWDER_SNOW && !getConfig().renderSnowFog)
|
||||
renderFog = false;
|
||||
|
||||
if (!renderFog)
|
||||
switch (submersion) {
|
||||
case NONE -> {
|
||||
World world = camera.getFocusedEntity().getWorld();
|
||||
if ((world.getRegistryKey() == World.OVERWORLD && !getConfig().renderOverworldFog)
|
||||
|| (world.getRegistryKey() == World.NETHER && !getConfig().renderNetherFog)
|
||||
|| (world.getRegistryKey() == World.END && !getConfig().renderEndFog)) {
|
||||
renderFog = false;
|
||||
}
|
||||
}
|
||||
case WATER -> renderFog = getConfig().renderWaterFog;
|
||||
case LAVA -> renderFog = getConfig().renderLavaFog;
|
||||
case POWDER_SNOW -> renderFog = getConfig().renderSnowFog;
|
||||
}
|
||||
|
||||
if (!renderFog) {
|
||||
cir.setReturnValue(EMPTY_FOG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ public class ModMenuIntegration implements ModMenuApi {
|
||||
|
||||
@Override
|
||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
System.out.println("Does ModMenuIntegration even load?");
|
||||
return parent -> new ConfigScreen(parent);
|
||||
return ConfigScreen::new;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user