aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-09-25 18:46:22 +0800
committershedaniel <daniel@shedaniel.me>2022-09-25 18:47:53 +0800
commitf05a50204ad710ced0b1b78ec69c0b954f5e2986 (patch)
treede5cdbc7b3c07cc154a4968343d653c707469352
parent6ad403672ef58063904e196fb5947c2de24b9c8f (diff)
downloadRoughlyEnoughItems-f05a50204ad710ced0b1b78ec69c0b954f5e2986.tar.gz
RoughlyEnoughItems-f05a50204ad710ced0b1b78ec69c0b954f5e2986.tar.bz2
RoughlyEnoughItems-f05a50204ad710ced0b1b78ec69c0b954f5e2986.zip
Fix forge api and default plugin publishing and fix #1055
-rw-r--r--api/build.gradle17
-rw-r--r--default-plugin/build.gradle14
-rw-r--r--fake/REIPlugin.classbin556 -> 627 bytes
-rw-r--r--fake/REIPluginClient.classbin0 -> 404 bytes
-rw-r--r--fake/REIPluginCommon.classbin0 -> 404 bytes
-rw-r--r--fake/REIPluginDedicatedServer.classbin0 -> 422 bytes
-rw-r--r--fake/REIPluginLoader.classbin0 -> 639 bytes
-rw-r--r--fake/REIPluginLoaderClient.classbin0 -> 416 bytes
-rw-r--r--fake/REIPluginLoaderCommon.classbin0 -> 416 bytes
-rw-r--r--fake/REIPluginLoaderDedicatedServer.classbin0 -> 434 bytes
-rw-r--r--fake/mods.toml10
-rw-r--r--forge/build.gradle24
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java47
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java1
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginClient.java34
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginCommon.java34
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginDedicatedServer.java34
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java1
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderClient.java34
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderCommon.java34
-rw-r--r--forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderDedicatedServer.java34
21 files changed, 287 insertions, 31 deletions
diff --git a/api/build.gradle b/api/build.gradle
index 9cbc69fa1..23ee2975c 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -1,3 +1,5 @@
+import net.fabricmc.loom.task.RemapJarTask
+
archivesBaseName = rootProject.name + "-" + project.name
dependencies {
@@ -22,13 +24,16 @@ task fakeJar(type: Jar, dependsOn: remapJar) {
classifier null
}
-task fakeForgeJar(type: Jar, dependsOn: remapJar) {
- from remapJar.archiveFile.map { zipTree(it) }
- from(rootProject.file("fake/fabric.mod.json")) {
- into ""
+task fakeForgeJar(type: Jar, dependsOn: jar) {
+ from jar.archiveFile.map { zipTree(it) }
+ from(rootProject.file("fake/mods.toml")) {
+ into "META-INF"
}
- from(rootProject.file("fake/REIPlugin.class")) {
- into "me/shedaniel/rei/forge"
+ ["REIPlugin", "REIPluginClient", "REIPluginCommon", "REIPluginDedicatedServer",
+ "REIPluginLoader", "REIPluginLoaderClient", "REIPluginLoaderCommon", "REIPluginLoaderDedicatedServer"].each {
+ from(rootProject.file("fake/$it.class")) {
+ into "me/shedaniel/rei/forge"
+ }
}
classifier "fake-forge"
}
diff --git a/default-plugin/build.gradle b/default-plugin/build.gradle
index 52b92ba90..c47536992 100644
--- a/default-plugin/build.gradle
+++ b/default-plugin/build.gradle
@@ -27,10 +27,16 @@ task fakeJar(type: Jar, dependsOn: remapJar) {
classifier null
}
-task fakeForgeJar(type: Jar, dependsOn: remapJar) {
- from remapJar.archiveFile.map { zipTree(it) }
- from(rootProject.file("fake/fabric.mod.json")) {
- into ""
+task fakeForgeJar(type: Jar, dependsOn: jar) {
+ from jar.archiveFile.map { zipTree(it) }
+ from(rootProject.file("fake/mods.toml")) {
+ into "META-INF"
+ }
+ ["REIPlugin", "REIPluginClient", "REIPluginCommon", "REIPluginDedicatedServer",
+ "REIPluginLoader", "REIPluginLoaderClient", "REIPluginLoaderCommon", "REIPluginLoaderDedicatedServer"].each {
+ from(rootProject.file("fake/$it.class")) {
+ into "me/shedaniel/rei/forge"
+ }
}
classifier "fake-forge"
}
diff --git a/fake/REIPlugin.class b/fake/REIPlugin.class
index 52c4432dc..83ddc0db7 100644
--- a/fake/REIPlugin.class
+++ b/fake/REIPlugin.class
Binary files differ
diff --git a/fake/REIPluginClient.class b/fake/REIPluginClient.class
new file mode 100644
index 000000000..b9b15aad1
--- /dev/null
+++ b/fake/REIPluginClient.class
Binary files differ
diff --git a/fake/REIPluginCommon.class b/fake/REIPluginCommon.class
new file mode 100644
index 000000000..1317a21b7
--- /dev/null
+++ b/fake/REIPluginCommon.class
Binary files differ
diff --git a/fake/REIPluginDedicatedServer.class b/fake/REIPluginDedicatedServer.class
new file mode 100644
index 000000000..251fa80ee
--- /dev/null
+++ b/fake/REIPluginDedicatedServer.class
Binary files differ
diff --git a/fake/REIPluginLoader.class b/fake/REIPluginLoader.class
new file mode 100644
index 000000000..e8112a583
--- /dev/null
+++ b/fake/REIPluginLoader.class
Binary files differ
diff --git a/fake/REIPluginLoaderClient.class b/fake/REIPluginLoaderClient.class
new file mode 100644
index 000000000..4a730e2eb
--- /dev/null
+++ b/fake/REIPluginLoaderClient.class
Binary files differ
diff --git a/fake/REIPluginLoaderCommon.class b/fake/REIPluginLoaderCommon.class
new file mode 100644
index 000000000..22e44c6b4
--- /dev/null
+++ b/fake/REIPluginLoaderCommon.class
Binary files differ
diff --git a/fake/REIPluginLoaderDedicatedServer.class b/fake/REIPluginLoaderDedicatedServer.class
new file mode 100644
index 000000000..46e006300
--- /dev/null
+++ b/fake/REIPluginLoaderDedicatedServer.class
Binary files differ
diff --git a/fake/mods.toml b/fake/mods.toml
new file mode 100644
index 000000000..6df8b4b18
--- /dev/null
+++ b/fake/mods.toml
@@ -0,0 +1,10 @@
+modLoader = "javafml"
+loaderVersion = "[1,)"
+logoFile = "icon.png"
+authors = "shedaniel"
+license = "MIT"
+
+[[mods]]
+modId = "rei_fake"
+version = "ABC"
+displayName = "THIS SHOULDN'T SHOW UP"
diff --git a/forge/build.gradle b/forge/build.gradle
index b62ac7829..b827d9b18 100644
--- a/forge/build.gradle
+++ b/forge/build.gradle
@@ -185,19 +185,29 @@ components.java {
publishing {
publications {
- mavenFabric(MavenPublication) {
+ mavenForge(MavenPublication) {
artifactId = rootProject.name + "-" + project.name
from components.java
}
["api", "default-plugin"].forEach { projectName ->
- create(projectName + "Fabric", MavenPublication.class) { publication ->
+ def remapSrg = tasks.create("remapSrgJarFor$projectName", net.fabricmc.loom.task.RemapJarTask) {
+ inputFile = project(":" + projectName).tasks.jar.archiveFile
+ classifier "srg-remapped-$projectName"
+ targetNamespace = "srg"
+ }
+ def remapSrgSourcesJar = tasks.create("remapSrgSourcesFor$projectName", net.fabricmc.loom.task.RemapSourcesJarTask) {
+ inputFile = project(":" + projectName).tasks.sourcesJar.archiveFile
+ classifier "srg-remapped-$projectName-sources"
+ targetNamespace = "srg"
+ }
+ create(projectName + "Forge", MavenPublication.class) { publication ->
publication.artifactId = rootProject.name + "-" + projectName + "-forge"
project.afterEvaluate {
def project = project(":" + projectName)
- publication.artifact(project.fakeForgeJar) { classifier null }
- def remapSourcesJarTask = project.remapSourcesJar
- publication.artifact(remapSourcesJarTask) {
- builtBy remapSourcesJarTask
+ remapSrg.inputFile = project.fakeForgeJar.archiveFile
+ publication.artifact(remapSrg) { classifier null }
+ publication.artifact(remapSrgSourcesJar) {
+ builtBy remapSrgSourcesJar
classifier "sources"
}
}
@@ -232,7 +242,7 @@ unifiedPublishing {
token = project.hasProperty("danielshe_curse_api_key") ? project.property("danielshe_curse_api_key") : System.getenv("danielshe_curse_api_key")
id = "310111"
gameVersions.addAll "Java 17"
-
+
relations {
depends "roughly-enough-items-hacks"
}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java b/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java
index 7c6092240..d4286ac02 100644
--- a/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java
+++ b/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java
@@ -38,6 +38,8 @@ import me.shedaniel.rei.plugin.common.runtime.DefaultRuntimePlugin;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
+import net.minecraftforge.fml.loading.FMLEnvironment;
+import org.jetbrains.annotations.NotNull;
import java.util.*;
import java.util.function.Supplier;
@@ -45,7 +47,7 @@ import java.util.function.Supplier;
public class PluginDetectorImpl implements PluginDetector {
private static <P extends me.shedaniel.rei.api.common.plugins.REIPlugin<?>> REIPluginProvider<P> wrapPlugin(List<String> modId, REIPluginProvider<P> plugin) {
return new REIPluginProvider<P>() {
- String nameSuffix = " [" + String.join(", ", modId) + "]";
+ final String nameSuffix = " [" + String.join(", ", modId) + "]";
@Override
public Collection<P> provide() {
@@ -64,13 +66,17 @@ public class PluginDetectorImpl implements PluginDetector {
};
}
- private static final Supplier<List<Map.Entry<REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>, List<String>>>> loaderProvided = Suppliers.memoize(() -> {
- List<Map.Entry<REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>, List<String>>> list = new ArrayList<>();
- AnnotationUtils.<REIPluginLoader, REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>>scanAnnotation(REIPluginLoader.class, REIPluginProvider.class::isAssignableFrom, (modId, provider, clazz) -> {
+ private static final Supplier<List<Map.Entry<REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>, List<String>>>> loaderProvided =
+ Suppliers.memoize(() -> getPluginsLoader(REIPluginLoader.class));
+
+ @NotNull
+ private static <T, P extends me.shedaniel.rei.api.common.plugins.REIPlugin<?>> List<Map.Entry<REIPluginProvider<P>, List<String>>> getPluginsLoader(Class<T> annotation) {
+ List<Map.Entry<REIPluginProvider<P>, List<String>>> list = new ArrayList<>();
+ AnnotationUtils.<T, REIPluginProvider<P>>scanAnnotation(annotation, REIPluginProvider.class::isAssignableFrom, (modId, provider, clazz) -> {
list.add(new AbstractMap.SimpleEntry<>(provider.get(), modId));
});
return list;
- });
+ }
@Override
public void detectServerPlugins() {
@@ -79,6 +85,11 @@ public class PluginDetectorImpl implements PluginDetector {
AnnotationUtils.<REIPlugin, REIServerPlugin>scanAnnotation(REIPlugin.class, REIServerPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> {
((PluginView<REIServerPlugin>) PluginManager.getServerInstance()).registerPlugin(wrapPlugin(modId, plugin.get()));
});
+ if (FMLEnvironment.dist == Dist.DEDICATED_SERVER) {
+ AnnotationUtils.<REIPluginDedicatedServer, REIServerPlugin>scanAnnotation(REIPluginDedicatedServer.class, REIServerPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> {
+ ((PluginView<REIServerPlugin>) PluginManager.getServerInstance()).registerPlugin(wrapPlugin(modId, plugin.get()));
+ });
+ }
for (Map.Entry<REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>, List<String>> entry : loaderProvided.get()) {
REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>> provider = entry.getKey();
Collection<me.shedaniel.rei.api.common.plugins.REIPlugin<?>> objects = provider.provide();
@@ -89,6 +100,11 @@ public class PluginDetectorImpl implements PluginDetector {
}
}
}
+ if (FMLEnvironment.dist == Dist.DEDICATED_SERVER) {
+ for (Map.Entry<REIPluginProvider<REIServerPlugin>, List<String>> entry : PluginDetectorImpl.<REIPluginLoaderDedicatedServer, REIServerPlugin>getPluginsLoader(REIPluginLoaderDedicatedServer.class)) {
+ ((PluginView<REIServerPlugin>) PluginManager.getServerInstance()).registerPlugin(wrapPlugin(entry.getValue(), entry.getKey()));
+ }
+ }
}
@Override
@@ -97,6 +113,12 @@ public class PluginDetectorImpl implements PluginDetector {
AnnotationUtils.<REIPlugin, me.shedaniel.rei.api.common.plugins.REIPlugin<?>>scanAnnotation(REIPlugin.class, me.shedaniel.rei.api.common.plugins.REIPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> {
((PluginView) PluginManager.getInstance()).registerPlugin(wrapPlugin(modId, plugin.get()));
});
+ AnnotationUtils.<REIPluginCommon, me.shedaniel.rei.api.common.plugins.REIPlugin<?>>scanAnnotation(REIPluginCommon.class, me.shedaniel.rei.api.common.plugins.REIPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> {
+ ((PluginView) PluginManager.getInstance()).registerPlugin(wrapPlugin(modId, plugin.get()));
+ });
+ for (Map.Entry<REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>, List<String>> entry : PluginDetectorImpl.getPluginsLoader(REIPluginLoaderCommon.class)) {
+ ((PluginView) PluginManager.getInstance()).registerPlugin(wrapPlugin(entry.getValue(), entry.getKey()));
+ }
}
@OnlyIn(Dist.CLIENT)
@@ -108,6 +130,9 @@ public class PluginDetectorImpl implements PluginDetector {
AnnotationUtils.<REIPlugin, REIClientPlugin>scanAnnotation(REIPlugin.class, REIClientPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> {
((PluginView<REIClientPlugin>) PluginManager.getClientInstance()).registerPlugin(wrapPlugin(modId, plugin.get()));
});
+ AnnotationUtils.<REIPluginClient, REIClientPlugin>scanAnnotation(REIPluginClient.class, REIClientPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> {
+ ((PluginView<REIClientPlugin>) PluginManager.getClientInstance()).registerPlugin(wrapPlugin(modId, plugin.get()));
+ });
for (Map.Entry<REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>>, List<String>> entry : loaderProvided.get()) {
REIPluginProvider<me.shedaniel.rei.api.common.plugins.REIPlugin<?>> provider = entry.getKey();
Collection<me.shedaniel.rei.api.common.plugins.REIPlugin<?>> objects = provider.provide();
@@ -117,15 +142,9 @@ public class PluginDetectorImpl implements PluginDetector {
}
}
}
-// ClientInternals.attachInstance((Supplier<List<String>>) () -> {
-// List<String> modIds = new ArrayList<>();
-// for (REIPluginProvider<REIClientPlugin> plugin : PluginManager.getClientInstance().getPluginProviders()) {
-// if (plugin instanceof JEIPluginDetector.JEIPluginProvider) {
-// modIds.addAll(((JEIPluginDetector.JEIPluginProvider) plugin).modIds);
-// }
-// }
-// return modIds;
-// }, "jeiCompatMods");
+ for (Map.Entry<REIPluginProvider<REIClientPlugin>, List<String>> entry : PluginDetectorImpl.<REIPluginLoaderClient, REIClientPlugin>getPluginsLoader(REIPluginLoaderClient.class)) {
+ ((PluginView<REIClientPlugin>) PluginManager.getClientInstance()).registerPlugin(wrapPlugin(entry.getValue(), entry.getKey()));
+ }
};
}
}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java
index db15c8093..70593ad9a 100644
--- a/forge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPlugin.java
@@ -32,6 +32,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
+@Deprecated(forRemoval = true)
public @interface REIPlugin {
Dist[] value() default {Dist.CLIENT, Dist.DEDICATED_SERVER};
}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginClient.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginClient.java
new file mode 100644
index 000000000..5584b5f7c
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginClient.java
@@ -0,0 +1,34 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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 java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface REIPluginClient {
+}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginCommon.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginCommon.java
new file mode 100644
index 000000000..b07ee4e0b
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginCommon.java
@@ -0,0 +1,34 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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 java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface REIPluginCommon {
+}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginDedicatedServer.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginDedicatedServer.java
new file mode 100644
index 000000000..38545d041
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginDedicatedServer.java
@@ -0,0 +1,34 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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 java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface REIPluginDedicatedServer {
+}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java
index 2ef9410fb..133a17a63 100644
--- a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoader.java
@@ -32,6 +32,7 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
+@Deprecated(forRemoval = true)
public @interface REIPluginLoader {
Dist[] value() default {Dist.CLIENT, Dist.DEDICATED_SERVER};
}
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderClient.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderClient.java
new file mode 100644
index 000000000..6824f511c
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderClient.java
@@ -0,0 +1,34 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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 java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface REIPluginLoaderClient {
+} \ No newline at end of file
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderCommon.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderCommon.java
new file mode 100644
index 000000000..7398e1d0d
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderCommon.java
@@ -0,0 +1,34 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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 java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface REIPluginLoaderCommon {
+} \ No newline at end of file
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderDedicatedServer.java b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderDedicatedServer.java
new file mode 100644
index 000000000..246b8c3cf
--- /dev/null
+++ b/forge/src/main/java/me/shedaniel/rei/forge/REIPluginLoaderDedicatedServer.java
@@ -0,0 +1,34 @@
+/*
+ * This file is licensed under the MIT License, part of Roughly Enough Items.
+ * Copyright (c) 2018, 2019, 2020, 2021, 2022 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 java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface REIPluginLoaderDedicatedServer {
+} \ No newline at end of file