Skip to content

Commit 7ec294e

Browse files
committed
Merge branch 'refs/heads/1.21.1/dev' into 1.21.1/stable
2 parents 7dcaa6d + 5152cee commit 7ec294e

32 files changed

Lines changed: 1808 additions & 210 deletions

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ val PARCHMENT_VERSION by extra { null }
1414
// https://semver.org/
1515
val MAVEN_GROUP by extra { "me.flashyreese.mods" }
1616
val ARCHIVE_NAME by extra { "sodium-extra" }
17-
val MOD_VERSION by extra { "0.8.7" }
17+
val MOD_VERSION by extra { "0.9.0" }
1818
val SODIUM_VERSION by extra { "0.8.12-alpha.3+mc1.21.1" }
1919

2020
allprojects {

common/src/main/java/me/flashyreese/mods/sodiumextra/client/SodiumExtraClientMod.java

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package me.flashyreese.mods.sodiumextra.client;
22

33
import me.flashyreese.mods.sodiumextra.client.config.SodiumExtraGameOptions;
4+
import me.flashyreese.mods.sodiumextra.client.config.SodiumExtraConfigKeys;
5+
import me.flashyreese.mods.sodiumextra.client.gui.FullscreenResolutionConfirmation;
46
import me.flashyreese.mods.sodiumextra.client.gui.SodiumExtraHud;
57
import net.caffeinemc.caffeineconfig.CaffeineConfig;
68
import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation;
@@ -43,7 +45,6 @@ public static CaffeineConfig mixinConfig() {
4345
.addMixinOption("cloud", true)
4446
.addMixinOption("compat", true, false)
4547
.addMixinOption("fog", true)
46-
.addMixinOption("fog_falloff", true)
4748
.addMixinOption("fps", true)
4849
.addMixinOption("gui", true)
4950
.addMixinOption("instant_sneak", true)
@@ -82,14 +83,31 @@ public static CaffeineConfig mixinConfig() {
8283
}
8384

8485
private static SodiumExtraGameOptions loadConfig() {
85-
return SodiumExtraGameOptions.load(PlatformRuntimeInformation.getInstance().getConfigDirectory().resolve("sodium-extra-options.json").toFile());
86+
return SodiumExtraGameOptions.load(PlatformRuntimeInformation.getInstance().getConfigDirectory().resolve(SodiumExtraConfigKeys.FILE_NAME).toFile());
87+
}
88+
89+
public static void armWaylandFullscreenResolutionRecovery() {
90+
SodiumExtraGameOptions options = options();
91+
if (!options.extraSettings.waylandFullscreenResolutionRecoveryPending) {
92+
options.extraSettings.waylandFullscreenResolutionRecoveryPending = true;
93+
options.writeChanges();
94+
}
95+
}
96+
97+
public static void disarmWaylandFullscreenResolutionRecovery() {
98+
SodiumExtraGameOptions options = options();
99+
if (options.extraSettings.waylandFullscreenResolutionRecoveryPending) {
100+
options.extraSettings.waylandFullscreenResolutionRecoveryPending = false;
101+
options.writeChanges();
102+
}
86103
}
87104

88105
public static void onTick(Minecraft client) {
89106
if (hud == null) {
90107
hud = new SodiumExtraHud();
91108
}
92109
hud.onStartTick(client);
110+
FullscreenResolutionConfirmation.tick(client);
93111
}
94112

95113
public static void onHudRender(GuiGraphics guiGraphics, DeltaTracker deltaTracker) {

common/src/main/java/me/flashyreese/mods/sodiumextra/client/config/SodiumExtraConfig.java

Lines changed: 534 additions & 88 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package me.flashyreese.mods.sodiumextra.client.config;
2+
3+
public final class SodiumExtraConfigKeys {
4+
public static final String FILE_NAME = "sodium-extra-options.json";
5+
public static final String EXTRA_SETTINGS = "extra_settings";
6+
public static final String WAYLAND_FULLSCREEN_RESOLUTION = "wayland_fullscreen_resolution";
7+
public static final String WAYLAND_FULLSCREEN_RESOLUTION_RECOVERY_PENDING = "wayland_fullscreen_resolution_recovery_pending";
8+
}

0 commit comments

Comments
 (0)