diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-02-23 14:46:06 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-02-23 14:46:06 +0800 |
| commit | ac2a724b0575438357810fdc71b4c2fa6590665c (patch) | |
| tree | eec15bf1eaad9918e2d3ae4d22918a5a7e50b455 /fabric/src/main/java | |
| parent | 792d6ee9325b0a14796de51e31c9f51876fcdf8f (diff) | |
| parent | a2309c47c447d217346147af5823e991feaf9dcd (diff) | |
| download | RoughlyEnoughItems-ac2a724b0575438357810fdc71b4c2fa6590665c.tar.gz RoughlyEnoughItems-ac2a724b0575438357810fdc71b4c2fa6590665c.tar.bz2 RoughlyEnoughItems-ac2a724b0575438357810fdc71b4c2fa6590665c.zip | |
Merge remote-tracking branch 'origin/7.x-1.18' into 7.x-1.18.2
# Conflicts:
# gradle.properties
# runtime/src/main/java/me/shedaniel/rei/impl/client/gui/screen/AbstractDisplayViewingScreen.java
Diffstat (limited to 'fabric/src/main/java')
| -rw-r--r-- | fabric/src/main/java/me/shedaniel/rei/fabric/RoughlyEnoughItemsInitializerImpl.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fabric/src/main/java/me/shedaniel/rei/fabric/RoughlyEnoughItemsInitializerImpl.java b/fabric/src/main/java/me/shedaniel/rei/fabric/RoughlyEnoughItemsInitializerImpl.java index 0a59b313d..566b52c22 100644 --- a/fabric/src/main/java/me/shedaniel/rei/fabric/RoughlyEnoughItemsInitializerImpl.java +++ b/fabric/src/main/java/me/shedaniel/rei/fabric/RoughlyEnoughItemsInitializerImpl.java @@ -62,7 +62,7 @@ public class RoughlyEnoughItemsInitializerImpl { RoughlyEnoughItemsState.error("Architectury API is not installed!", "https://www.curseforge.com/minecraft/mc-mods/architectury-fabric/files/all"); } else { Version version = FabricLoader.getInstance().getModContainer("architectury").get().getMetadata().getVersion(); - + try { if (version instanceof SemanticVersion && SemanticVersion.parse("2.6.0").compareTo((SemanticVersion) version) > 0) { RoughlyEnoughItemsState.error("Architectury API is too old, please update!", "https://www.curseforge.com/minecraft/mc-mods/architectury-fabric/files/all"); @@ -72,14 +72,8 @@ public class RoughlyEnoughItemsInitializerImpl { } } if (isClient()) { - try { - if (!FabricLoader.getInstance().isModLoaded("cloth-config2")) { - RoughlyEnoughItemsState.error("Cloth Config is not installed!", "https://www.curseforge.com/minecraft/mc-mods/cloth-config/files/all"); - } else if (SemanticVersion.parse(FabricLoader.getInstance().getModContainer("cloth-config2").get().getMetadata().getVersion().getFriendlyString()).compareTo(SemanticVersion.parse("5.1")) < 0) { - RoughlyEnoughItemsState.error("Your Cloth Config version is too old!", "https://www.curseforge.com/minecraft/mc-mods/cloth-config/files/all"); - } - } catch (VersionParsingException e) { - e.printStackTrace(); + if (!FabricLoader.getInstance().isModLoaded("cloth-config2")) { + RoughlyEnoughItemsState.error("Cloth Config is not installed!", "https://www.curseforge.com/minecraft/mc-mods/cloth-config/files/all"); } } } @@ -87,4 +81,8 @@ public class RoughlyEnoughItemsInitializerImpl { public static boolean isDev() { return FabricLoader.getInstance().isDevelopmentEnvironment(); } + + public static String getMinecraftVersion() { + return FabricLoader.getInstance().getModContainer("minecraft").get().getMetadata().getVersion().getFriendlyString(); + } } |
