Skip to content

Commit

Permalink
Remove sodium version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Aug 17, 2023
1 parent 5d5271b commit 3fd0fc0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 97 deletions.
12 changes: 1 addition & 11 deletions src/main/java/net/coderbot/iris/Iris.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.common.base.Throwables;
import com.mojang.blaze3d.platform.GlDebug;
import com.mojang.blaze3d.platform.InputConstants;
import net.coderbot.iris.compat.sodium.SodiumVersionCheck;
import net.coderbot.iris.config.IrisConfig;
import net.coderbot.iris.gl.GLDebug;
import net.coderbot.iris.gl.shader.ShaderCompileException;
Expand Down Expand Up @@ -115,16 +114,7 @@ public class Iris {
*/
public void onEarlyInitialize() {
FabricLoader.getInstance().getModContainer("sodium").ifPresent(
modContainer -> {
sodiumInstalled = true;
String versionString = modContainer.getMetadata().getVersion().getFriendlyString();

// This makes it so that if we don't have the right version of Sodium, it will show the user a
// nice warning, and prevent them from playing the game with a wrong version of Sodium.
if (!SodiumVersionCheck.isAllowedVersion(versionString)) {
sodiumInvalid = true;
}
}
modContainer -> sodiumInstalled = true
);

hasNEC = FabricLoader.getInstance().isModLoaded("notenoughcrashes");
Expand Down

This file was deleted.

This file was deleted.

5 changes: 2 additions & 3 deletions src/main/java/net/coderbot/iris/mixin/MixinTitleScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.google.common.collect.ImmutableList;
import net.coderbot.iris.Iris;
import net.coderbot.iris.compat.sodium.SodiumVersionCheck;
import net.coderbot.iris.gui.debug.DebugLoadFailedGridScreen;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.ChatFormatting;
Expand Down Expand Up @@ -73,7 +72,7 @@ protected MixinTitleScreen(Component arg) {
}
iris$hasFirstInit = true;

Minecraft.getInstance().setScreen(new ConfirmScreen(
/*Minecraft.getInstance().setScreen(new ConfirmScreen(
(boolean accepted) -> {
if (accepted) {
try {
Expand All @@ -92,6 +91,6 @@ protected MixinTitleScreen(Component arg) {
Component.translatable("iris.sodium.failure.title").withStyle(ChatFormatting.RED),
Component.translatable(reason),
Component.translatable("iris.sodium.failure.download"),
FabricLoader.getInstance().isDevelopmentEnvironment() ? Component.literal("Continue (Development)") : Component.translatable("menu.quit")));
FabricLoader.getInstance().isDevelopmentEnvironment() ? Component.literal("Continue (Development)") : Component.translatable("menu.quit")));*/
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.coderbot.iris.compat.sodium.mixin;

import net.coderbot.iris.compat.sodium.SodiumVersionCheck;
import net.fabricmc.loader.api.FabricLoader;
import org.objectweb.asm.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
Expand All @@ -19,11 +18,7 @@ public class IrisSodiumCompatMixinPlugin implements IMixinConfigPlugin {

@Override
public void onLoad(String mixinPackage) {
validSodiumVersion = FabricLoader.getInstance().getModContainer("sodium").map(sodium -> {
String version = sodium.getMetadata().getVersion().getFriendlyString();

return FabricLoader.getInstance().isDevelopmentEnvironment() || SodiumVersionCheck.isAllowedVersion(version);
}).orElse(false);
validSodiumVersion = FabricLoader.getInstance().isModLoaded("sodium");

if (!validSodiumVersion) {
// We can't use Iris' logger here due to classloading issues.
Expand Down

0 comments on commit 3fd0fc0

Please sign in to comment.