Replace DhApiFogColorMode with FogColorMode
This commit is contained in:
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.seibel.lod.core.api.external.config.client.graphics;
|
||||
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogColorMode;
|
||||
import com.seibel.lod.core.enums.rendering.FogColorMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDistance;
|
||||
import com.seibel.lod.core.api.external.apiObjects.objects.DhApiConfig_v1;
|
||||
import com.seibel.lod.core.config.Config.Client.Graphics.FogQuality;
|
||||
@@ -24,7 +24,7 @@ public class DhApiGraphicsFog
|
||||
{ return new DhApiConfig_v1<>(FogQuality.fogDrawMode); }
|
||||
|
||||
/** Returns the config related to the fog draw type. */
|
||||
public static DhApiConfig_v1<DhApiFogColorMode> getFogColorConfig_v1()
|
||||
public static DhApiConfig_v1<FogColorMode> getFogColorConfig_v1()
|
||||
{ return new DhApiConfig_v1<>(FogQuality.fogColorMode); }
|
||||
|
||||
/** Returns the config related to disabling vanilla fog. */
|
||||
|
||||
Vendored
-1
@@ -1,7 +1,6 @@
|
||||
package com.seibel.lod.core.api.external.config.client.graphics;
|
||||
|
||||
import com.seibel.lod.core.api.external.apiObjects.objects.DhApiConfig_v1;
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiRendererType;
|
||||
import com.seibel.lod.core.config.Config.Client.Graphics.Quality;
|
||||
import com.seibel.lod.core.config.Config.Client.Advanced.Debugging;
|
||||
|
||||
@@ -21,7 +21,7 @@ package com.seibel.lod.core.config;
|
||||
|
||||
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDrawMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogColorMode;
|
||||
import com.seibel.lod.core.enums.rendering.FogColorMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDistance;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiRendererType;
|
||||
import com.seibel.lod.core.config.types.*;
|
||||
@@ -192,13 +192,13 @@ public class Config
|
||||
+ "Disabling fog will improve GPU performance.")
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<DhApiFogColorMode> fogColorMode = new ConfigEntry.Builder<DhApiFogColorMode>()
|
||||
.set(DhApiFogColorMode.USE_WORLD_FOG_COLOR)
|
||||
public static ConfigEntry<FogColorMode> fogColorMode = new ConfigEntry.Builder<FogColorMode>()
|
||||
.set(FogColorMode.USE_WORLD_FOG_COLOR)
|
||||
.comment(""
|
||||
+ "What color should fog use? \n"
|
||||
+ "\n"
|
||||
+ DhApiFogColorMode.USE_WORLD_FOG_COLOR + ": Use the world's fog color. \n"
|
||||
+ DhApiFogColorMode.USE_SKY_COLOR + ": Use the sky's color. \n"
|
||||
+ FogColorMode.USE_WORLD_FOG_COLOR + ": Use the world's fog color. \n"
|
||||
+ FogColorMode.USE_SKY_COLOR + ": Use the sky's color. \n"
|
||||
+ "\n"
|
||||
+ "This setting doesn't affect performance.")
|
||||
.build();
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
|
||||
* licensed under the GNU LGPL v3 License.
|
||||
*
|
||||
* Copyright (C) 2020-2022 James Seibel
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.core.enums.rendering;
|
||||
|
||||
/**
|
||||
* USE_DEFAULT_FOG_COLOR, <br>
|
||||
* USE_SKY_COLOR, <br>
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2022-6-9
|
||||
*/
|
||||
public enum FogColorMode
|
||||
{
|
||||
// Reminder:
|
||||
// when adding items: up the API minor version
|
||||
// when removing items: up the API major version
|
||||
|
||||
/** Fog uses Minecraft's fog color. */
|
||||
USE_WORLD_FOG_COLOR,
|
||||
|
||||
/**
|
||||
* Replicates the effect of the clear sky mod.
|
||||
* Making the fog blend in with the sky better
|
||||
* For it to look good you need one of the following mods:
|
||||
* https://www.curseforge.com/minecraft/mc-mods/clear-skies
|
||||
* https://www.curseforge.com/minecraft/mc-mods/clear-skies-forge-port
|
||||
*/
|
||||
USE_SKY_COLOR,
|
||||
}
|
||||
@@ -39,7 +39,7 @@ import org.lwjgl.opengl.GL32;
|
||||
|
||||
import com.seibel.lod.core.builders.lodBuilding.bufferBuilding.LodBufferBuilderFactory;
|
||||
import com.seibel.lod.core.enums.rendering.DebugMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogColorMode;
|
||||
import com.seibel.lod.core.enums.rendering.FogColorMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDistance;
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler;
|
||||
import com.seibel.lod.core.objects.lod.LodDimension;
|
||||
@@ -432,7 +432,7 @@ public class LodRenderer
|
||||
{
|
||||
Color fogColor;
|
||||
|
||||
if (CONFIG.client().graphics().fogQuality().getFogColorMode() == DhApiFogColorMode.USE_SKY_COLOR)
|
||||
if (CONFIG.client().graphics().fogQuality().getFogColorMode() == FogColorMode.USE_SKY_COLOR)
|
||||
fogColor = MC_RENDER.getSkyColor();
|
||||
else
|
||||
fogColor = MC_RENDER.getFogColor(partialTicks);
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.seibel.lod.core.config.Config;
|
||||
import com.seibel.lod.core.builders.lodBuilding.bufferBuilding.LodBufferBuilderFactory;
|
||||
import com.seibel.lod.core.config.types.ConfigEntry;
|
||||
import com.seibel.lod.core.enums.rendering.DebugMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogColorMode;
|
||||
import com.seibel.lod.core.enums.rendering.FogColorMode;
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonHandler;
|
||||
import com.seibel.lod.core.logging.ConfigBasedLogger;
|
||||
import com.seibel.lod.core.logging.ConfigBasedSpamLogger;
|
||||
@@ -276,7 +276,7 @@ public class a7LodRenderer
|
||||
{
|
||||
Color fogColor;
|
||||
|
||||
if (Config.Client.Graphics.FogQuality.fogColorMode.get() == DhApiFogColorMode.USE_SKY_COLOR)
|
||||
if (Config.Client.Graphics.FogQuality.fogColorMode.get() == FogColorMode.USE_SKY_COLOR)
|
||||
fogColor = MC_RENDER.getSkyColor();
|
||||
else
|
||||
fogColor = MC_RENDER.getFogColor(partialTicks);
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@
|
||||
package com.seibel.lod.core.wrapperInterfaces.config;
|
||||
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDrawMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogColorMode;
|
||||
import com.seibel.lod.core.enums.rendering.FogColorMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDistance;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiRendererType;
|
||||
import com.seibel.lod.core.enums.config.*;
|
||||
@@ -99,8 +99,8 @@ public interface ILodConfigWrapperSingleton extends IBindable
|
||||
DhApiFogDrawMode getFogDrawMode();
|
||||
void setFogDrawMode(DhApiFogDrawMode newFogDrawMode);
|
||||
|
||||
DhApiFogColorMode getFogColorMode();
|
||||
void setFogColorMode(DhApiFogColorMode newFogColorMode);
|
||||
FogColorMode getFogColorMode();
|
||||
void setFogColorMode(FogColorMode newFogColorMode);
|
||||
|
||||
boolean getDisableVanillaFog();
|
||||
void setDisableVanillaFog(boolean newDisableVanillaFog);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.seibel.lod.core.wrapperInterfaces.config;
|
||||
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDrawMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogColorMode;
|
||||
import com.seibel.lod.core.enums.rendering.FogColorMode;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiFogDistance;
|
||||
import com.seibel.lod.core.api.external.apiObjects.enums.DhApiRendererType;
|
||||
import com.seibel.lod.core.config.Config;
|
||||
@@ -235,13 +235,13 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton
|
||||
|
||||
|
||||
@Override
|
||||
public DhApiFogColorMode getFogColorMode()
|
||||
public FogColorMode getFogColorMode()
|
||||
{
|
||||
return Config.Client.Graphics.FogQuality.fogColorMode.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFogColorMode(DhApiFogColorMode newFogColorMode)
|
||||
public void setFogColorMode(FogColorMode newFogColorMode)
|
||||
{
|
||||
Config.Client.Graphics.FogQuality.fogColorMode.set(newFogColorMode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user