aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-05-17 21:41:37 +0800
committershedaniel <daniel@shedaniel.me>2021-05-17 21:41:37 +0800
commit943c7aab9fe4dac5801d5dfa9af2611331eccd78 (patch)
tree5956ccecec82a594830fcb6a8855b7a633595859 /forge
parent0cd2336ababe5d6c78a64943adde5b54cb3e72b6 (diff)
parent745f78a4aa7d23fe03e7420eb3fe06b8c418db35 (diff)
downloadRoughlyEnoughItems-943c7aab9fe4dac5801d5dfa9af2611331eccd78.tar.gz
RoughlyEnoughItems-943c7aab9fe4dac5801d5dfa9af2611331eccd78.tar.bz2
RoughlyEnoughItems-943c7aab9fe4dac5801d5dfa9af2611331eccd78.zip
Merge remote-tracking branch 'origin/6.x' into 6.x-1.17
Diffstat (limited to 'forge')
-rw-r--r--forge/build.gradle2
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/JEIStub.java31
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsInitializerImpl.java15
-rw-r--r--forge/src/main/java/me/shedaniel/rei/impl/client/forge/ErrorDisplayerImpl.java33
-rw-r--r--forge/src/main/resources/META-INF/mods.toml16
5 files changed, 87 insertions, 10 deletions
diff --git a/forge/build.gradle b/forge/build.gradle
index c7ccec31c..dd119678f 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle
@@ -57,6 +57,8 @@ dependencies {
modRuntime("appeng:appliedenergistics2:8.2.0")
modRuntime("curse.maven:tcon-74072:3273213")
modRuntime("curse.maven:mantle-74924:3273201")
+ modRuntime("curse.maven:jer-240630:3066754")
+ modRuntime("curse.maven:jep-417645:3198370")
}
shadowJar {
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/JEIStub.java b/forge/src/main/java/me/shedaniel/rei/forge/JEIStub.java
new file mode 100644
index 000000000..de0c34314
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/JEIStub.java
@@ -0,0 +1,31 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.forge;
+
+import net.minecraftforge.fml.common.Mod;
+
+// Hello mods, JEI is present!! Please give in and trust me!
+@Mod("jei")
+public class JEIStub {
+}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsInitializerImpl.java b/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsInitializerImpl.java
index 45b4e39a7..6baa7fd5c 100644
--- a/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsInitializerImpl.java
+++ b/forge/src/main/java/me/shedaniel/rei/forge/RoughlyEnoughItemsInitializerImpl.java
@@ -23,10 +23,9 @@
package me.shedaniel.rei.forge;
-import me.shedaniel.rei.RoughlyEnoughItemsState;
import net.minecraftforge.api.distmarker.Dist;
-import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.loading.FMLEnvironment;
+import net.minecraftforge.fml.loading.FMLLoader;
public class RoughlyEnoughItemsInitializerImpl {
public static boolean isClient() {
@@ -34,13 +33,9 @@ public class RoughlyEnoughItemsInitializerImpl {
}
public static void checkMods() {
- if (ModList.get().isLoaded("jei")) {
- RoughlyEnoughItemsState.error("JEI is installed! REI is an replacement of JEI, we can't co-exist!");
- }
- if (isClient()) {
- if (!ModList.get().isLoaded("cloth-config")) {
- RoughlyEnoughItemsState.error("Cloth Config is not installed!", "https://www.curseforge.com/minecraft/mc-mods/cloth-config/files/all");
- }
- }
+ }
+
+ public static boolean isDev() {
+ return !FMLLoader.isProduction();
}
}
diff --git a/forge/src/main/java/me/shedaniel/rei/impl/client/forge/ErrorDisplayerImpl.java b/forge/src/main/java/me/shedaniel/rei/impl/client/forge/ErrorDisplayerImpl.java
new file mode 100644
index 000000000..5186c7884
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/impl/client/forge/ErrorDisplayerImpl.java
@@ -0,0 +1,33 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021 shedaniel
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package me.shedaniel.rei.impl.client.forge;
+
+import net.minecraft.client.gui.screens.Screen;
+
+import java.util.function.Consumer;
+
+public class ErrorDisplayerImpl {
+ public static void registerGuiInit(Consumer<Screen> consumer) {
+ }
+}
diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml
index 74fa66012..6aebf09b4 100644
--- a/forge/src/main/resources/META-INF/mods.toml
+++ b/forge/src/main/resources/META-INF/mods.toml
@@ -4,6 +4,7 @@ issueTrackerURL = "https://github.com/shedaniel/RoughlyEnoughItems/issues"
logoFile = "icon.png"
authors = "shedaniel"
license = "MIT"
+
[[mods]]
modId = "roughlyenoughitems"
version = "${version}"
@@ -12,9 +13,24 @@ description = '''
To allow players to view items and recipes.
'''
+[[mods]]
+modId = "jei"
+version = "7.9999"
+displayName = "Roughly Enough Items (JEI Stub)"
+description = '''
+To allow players to view items and recipes.
+'''
+
[[dependencies.roughlyenoughitems]]
modId = "architectury"
mandatory = true
versionRange = "[1.10.139,)"
ordering = "NONE"
side = "BOTH"
+
+[[dependencies.roughlyenoughitems]]
+modId = "cloth-config"
+mandatory = true
+versionRange = "[4.11.18,)"
+ordering = "NONE"
+side = "BOTH"