diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-08-15 01:07:39 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2023-05-29 21:15:27 +0800 |
| commit | 339a8514d4088a217b74ad8f7437bfb875ec7ec0 (patch) | |
| tree | 471e68d3a364f6680698090f2567ef4b224d57ec /fabric/src/main | |
| parent | b0db4d9e3fc23da62ba45ab6909d81af1b984b83 (diff) | |
| download | RoughlyEnoughItems-339a8514d4088a217b74ad8f7437bfb875ec7ec0.tar.gz RoughlyEnoughItems-339a8514d4088a217b74ad8f7437bfb875ec7ec0.tar.bz2 RoughlyEnoughItems-339a8514d4088a217b74ad8f7437bfb875ec7ec0.zip | |
Switch to Error Notifier
Diffstat (limited to 'fabric/src/main')
| -rw-r--r-- | fabric/src/main/java/me/shedaniel/rei/fabric/PrimitivePlatformAdapterImpl.java | 41 | ||||
| -rw-r--r-- | fabric/src/main/resources/error_notifier.json | 26 |
2 files changed, 26 insertions, 41 deletions
diff --git a/fabric/src/main/java/me/shedaniel/rei/fabric/PrimitivePlatformAdapterImpl.java b/fabric/src/main/java/me/shedaniel/rei/fabric/PrimitivePlatformAdapterImpl.java index 3b5d4ef7a..54cbfe4ad 100644 --- a/fabric/src/main/java/me/shedaniel/rei/fabric/PrimitivePlatformAdapterImpl.java +++ b/fabric/src/main/java/me/shedaniel/rei/fabric/PrimitivePlatformAdapterImpl.java @@ -23,8 +23,6 @@ package me.shedaniel.rei.fabric; -import com.google.common.collect.ImmutableSet; -import me.shedaniel.rei.RoughlyEnoughItemsState; import me.shedaniel.rei.impl.init.PrimitivePlatformAdapter; import net.fabricmc.api.EnvType; import net.fabricmc.loader.api.FabricLoader; @@ -40,45 +38,6 @@ public class PrimitivePlatformAdapterImpl implements PrimitivePlatformAdapter { @Override public void checkMods() { - ImmutableSet<String> requiredModules = isClient() ? - ImmutableSet.<String>builder() - .add("fabric-api-base") - .add("fabric-resource-loader-v0") - .add("fabric-networking-v0") - .add("fabric-lifecycle-events-v1") - .add("fabric-rendering-fluids-v1") - .build() : - ImmutableSet.<String>builder() - .add("fabric-api-base") - .add("fabric-resource-loader-v0") - .add("fabric-networking-v0") - .add("fabric-lifecycle-events-v1") - .build(); - for (String module : requiredModules) { - boolean moduleLoaded = FabricLoader.getInstance().isModLoaded(module); - if (!moduleLoaded) { - RoughlyEnoughItemsState.error("Fabric API is not installed!", "https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/all"); - break; - } - } - if (!FabricLoader.getInstance().isModLoaded("architectury")) { - RoughlyEnoughItemsState.error("Architectury API is not installed!", "https://www.curseforge.com/minecraft/mc-mods/architectury-api/files/all"); - } else { - Version version = FabricLoader.getInstance().getModContainer("architectury").get().getMetadata().getVersion(); - - try { - if (version instanceof SemanticVersion && SemanticVersion.parse("1.24.0").compareTo((SemanticVersion) version) > 0) { - RoughlyEnoughItemsState.error("Architectury API is too old, please update!", "https://www.curseforge.com/minecraft/mc-mods/architectury-api/files/all"); - } - } catch (VersionParsingException e) { - e.printStackTrace(); - } - } - if (isClient()) { - if (!FabricLoader.getInstance().isModLoaded("cloth-config2")) { - RoughlyEnoughItemsState.error("Cloth Config is not installed!", "https://www.curseforge.com/minecraft/mc-mods/cloth-config/files/all"); - } - } } @Override diff --git a/fabric/src/main/resources/error_notifier.json b/fabric/src/main/resources/error_notifier.json new file mode 100644 index 000000000..90d2a76bf --- /dev/null +++ b/fabric/src/main/resources/error_notifier.json @@ -0,0 +1,26 @@ +{ + "schemaVersion": 1, + "checks": [ + { + "type": "depends", + "modId": "fabric", + "modName": "Fabric API", + "versions": "*", + "url": "https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/all/" + }, + { + "type": "depends", + "modId": "architectury", + "modName": "Architectury API", + "versions": ">=1.0.0 <2.0.0", + "url": "https://www.curseforge.com/minecraft/mc-mods/architectury-api/files/all" + }, + { + "type": "depends", + "modId": "cloth-config2", + "modName": "Cloth Config", + "versions": "*", + "url": "https://www.curseforge.com/minecraft/mc-mods/cloth-config/files/all" + } + ] +}
\ No newline at end of file |
