diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-08-15 01:07:39 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-08-15 01:09:26 +0800 |
| commit | d4bd40db6d87ead0623adcf751fc1409896c86e8 (patch) | |
| tree | 8090713b97bebb97987937dfc89ec48b46e1e965 /fabric/src | |
| parent | be1db8e11143641bb45f43d42eb579468a620b09 (diff) | |
| download | RoughlyEnoughItems-d4bd40db6d87ead0623adcf751fc1409896c86e8.tar.gz RoughlyEnoughItems-d4bd40db6d87ead0623adcf751fc1409896c86e8.tar.bz2 RoughlyEnoughItems-d4bd40db6d87ead0623adcf751fc1409896c86e8.zip | |
Switch to Error Notifier
Diffstat (limited to 'fabric/src')
| -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 e5eb4f542..b81f1c98c 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-api-v1") - .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-api-v1") - .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("4.5.75").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..eb85f6a7c --- /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": ">=5.0.0 <7.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 |
