mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-14 01:14:08 +00:00
Invert Horizon and Terrain Fog toggles (#1454)
This commit is contained in:
1 parent
bdd6259c3f
commit
a36aec36a2
7 files changed
+22
-22
No files matched your search
@@ -99,8 +99,8 @@ public enum Settings {
|
||||
ChunkRebuildManager.setMaxTicksWaiting((int) this.option.getStore());
|
||||
}
|
||||
},
|
||||
HORIZON_DISABLE(new NotFineOptionTickBox(true, OptionImpact.LOW)),
|
||||
FOG_DISABLE(new NotFineOptionTickBox(false, OptionImpact.LOW)),
|
||||
HORIZON(new NotFineOptionTickBox(true, OptionImpact.LOW)),
|
||||
TERRAIN_FOG(new NotFineOptionTickBox(true, OptionImpact.LOW)),
|
||||
FOG_NEAR_DISTANCE(new NotFineOptionSliderPercentage(75, 1, 100, 1, OptionImpact.LOW)),
|
||||
GUI_BACKGROUND(new NotFineOptionCycling<>(BackgroundSelect.DEFAULT, null)) {
|
||||
@Override
|
||||
|
||||
@@ -209,8 +209,8 @@ public class NotFineGameOptionPages {
|
||||
.add(Settings.MODE_CLOUD_TRANSLUCENCY.option)
|
||||
.add(Settings.MODE_STARS.option)
|
||||
.add(Settings.TOTAL_STARS.option)
|
||||
.add(Settings.HORIZON_DISABLE.option)
|
||||
.add(Settings.FOG_DISABLE.option)
|
||||
.add(Settings.HORIZON.option)
|
||||
.add(Settings.TERRAIN_FOG.option)
|
||||
.add(Settings.FOG_NEAR_DISTANCE.option)
|
||||
.build());
|
||||
return new OptionPage(I18n.format("options.button.sky"), ImmutableList.copyOf(groups));
|
||||
|
||||
@@ -516,12 +516,12 @@ public class SodiumGameOptionPages {
|
||||
.add(Settings.MODE_CLOUD_TRANSLUCENCY.option)
|
||||
.add(Settings.MODE_STARS.option)
|
||||
.add(Settings.TOTAL_STARS.option)
|
||||
.add(Settings.HORIZON_DISABLE.option)
|
||||
.add(Settings.HORIZON.option)
|
||||
.add(Settings.MODE_LIGHT_FLICKER.option)
|
||||
.build());
|
||||
|
||||
groups.add(OptionGroup.createBuilder()
|
||||
.add(Settings.FOG_DISABLE.option)
|
||||
.add(Settings.TERRAIN_FOG.option)
|
||||
.add(Settings.FOG_NEAR_DISTANCE.option)
|
||||
.add(Settings.VOID_FOG.option)
|
||||
.build());
|
||||
|
||||
@@ -20,12 +20,12 @@ options.downfall_distance=Weather Effects
|
||||
options.downfall_distance.tooltip=Weather Effects
|
||||
options.dynamic_fov=Dynamic FOV
|
||||
options.dynamic_fov.tooltip=If enabled, the game's field of view will change based on the player's speed.
|
||||
options.horizon_disable=Disable Horizon
|
||||
options.horizon_disable.tooltip=Disable Horizon
|
||||
options.fog_disable=Disable Terrain Fog
|
||||
options.fog_disable.tooltip=Disable Terrain Fog
|
||||
options.horizon=Horizon
|
||||
options.horizon.tooltip=Horizon
|
||||
options.terrain_fog=Terrain Fog
|
||||
options.terrain_fog.tooltip=Terrain Fog (aka View Distance Fog)
|
||||
options.fog_near_distance=Near Fog Distance
|
||||
options.fog_near_distance.tooltip=Near Fog Distance
|
||||
options.fog_near_distance.tooltip=Distance away from the player when the view distance fog will start (0%% opacity then linear increase to render distance)
|
||||
options.mode_cloud_translucency=Cloud Translucency
|
||||
options.mode_cloud_translucency.tooltip=Cloud Translucency
|
||||
options.mode_clouds=Clouds
|
||||
|
||||
+4
-4
@@ -32,14 +32,14 @@ public abstract class MixinRenderGlobal {
|
||||
return (boolean)Settings.MODE_SKY.option.getStore();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@WrapWithCondition(
|
||||
method = "renderSky(F)V",
|
||||
at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glCallList(I)V", ordinal = 3, remap = false))
|
||||
private boolean conditionalDisableHorizon(int i) {
|
||||
return !(boolean)Settings.HORIZON_DISABLE.option.getStore();
|
||||
private boolean conditionalRenderHorizon(int i) {
|
||||
return (boolean)Settings.HORIZON.option.getStore();
|
||||
}
|
||||
|
||||
|
||||
@WrapWithCondition(
|
||||
method = "renderSky(F)V",
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/IRenderHandler;render(FLnet/minecraft/client/multiplayer/WorldClient;Lnet/minecraft/client/Minecraft;)V", remap = false))
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ abstract public class MixinEntityRenderer {
|
||||
)
|
||||
private float notFine$nearFogDistance(float value) {
|
||||
// Extremely high values cause issues, but 15 mebimeters out should be practically infinite
|
||||
if ((Boolean) Settings.FOG_DISABLE.option.getStore()) return 1024 * 1024 * 15;
|
||||
if (!(Boolean) Settings.TERRAIN_FOG.option.getStore()) return 1024 * 1024 * 15;
|
||||
return farPlaneDistance * (int) Settings.FOG_NEAR_DISTANCE.option.getStore() * 0.01F - 1F;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ abstract public class MixinEntityRenderer {
|
||||
)
|
||||
)
|
||||
private float notFine$replaceFarFogDistance(float value) {
|
||||
if ((Boolean) Settings.FOG_DISABLE.option.getStore()) return 1024 * 1024 * 16;
|
||||
if (!(Boolean) Settings.TERRAIN_FOG.option.getStore()) return 1024 * 1024 * 16;
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -13,17 +13,17 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(value = SkyProviderCelestial.class, priority = 100)
|
||||
public class MixinSkyProviderCelestial_Tweaks {
|
||||
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glCallList(I)V", ordinal = 2), remap = false)
|
||||
private boolean angelica$disableHorizon(int i) {
|
||||
return !(boolean) Settings.HORIZON_DISABLE.option.getStore();
|
||||
private boolean angelica$renderHorizon(int i) {
|
||||
return (boolean) Settings.HORIZON.option.getStore();
|
||||
}
|
||||
|
||||
|
||||
@Inject(method = "render", at = @At(value="INVOKE", target="Lnet/minecraft/client/renderer/Tessellator;draw()I", ordinal = 1))
|
||||
private void angelica$disableAltitudePlanetRenderer(CallbackInfo ci) {
|
||||
if(CompatConfig.NTMSpace_disableAltitudePlanetRenderer == CompatConfig.altitudePlanetRendererState.Always || (IrisApi.getInstance().isShaderPackInUse() && CompatConfig.NTMSpace_disableAltitudePlanetRenderer == CompatConfig.altitudePlanetRendererState.ShadersOnly)) {
|
||||
Tessellator.instance.vertexCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user