From 0bb16678cd6920ed53d0cdce332f45f9fdc3da03 Mon Sep 17 00:00:00 2001 From: Abigail Ient Date: Sat, 30 Dec 2023 20:12:43 +0000 Subject: [PATCH] remove jei fabric api module injection/relocation as it is not necessary --- jei-bridge/build.gradle.kts | 9 --------- .../connectorextras/jeibridge/JEIBridge.java | 6 ------ .../jeibridge/mixin/MainEntrypointMixin.java | 15 --------------- .../src/main/resources/mixins.jeibridge.json | 3 +-- 4 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/mixin/MainEntrypointMixin.java diff --git a/jei-bridge/build.gradle.kts b/jei-bridge/build.gradle.kts index e56e7ae..9eaf508 100644 --- a/jei-bridge/build.gradle.kts +++ b/jei-bridge/build.gradle.kts @@ -1,12 +1,9 @@ -import org.gradle.jvm.tasks.Jar - plugins { id("dev.architectury.loom") } val versionMc: String by rootProject val versionForge: String by rootProject -val relocateDirectory: Jar.(String, String) -> Unit by rootProject.extra loom { forge { @@ -28,14 +25,8 @@ dependencies { mappings(loom.officialMojangMappings()) forge("net.minecraftforge:forge:$versionMc-$versionForge") - compileOnly(project(":extras-utils")) - modImplementation(group = "dev.su5ed.sinytra", name = "fabric-loader", version = "2.3.4+0.14.21+1.20.1") modImplementation(group = "dev.su5ed.sinytra.fabric-api", name = "fabric-transfer-api-v1", version = "3.3.1+6acac45477") modImplementation(group = "mezz.jei", name = "jei-$versionMc-forge", version = "15.2.0.27") } - -tasks.remapJar { - relocateDirectory(this, "mezz/jei", "relocate/mezz/jei") -} diff --git a/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/JEIBridge.java b/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/JEIBridge.java index 224cdf9..20b02dd 100644 --- a/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/JEIBridge.java +++ b/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/JEIBridge.java @@ -1,7 +1,6 @@ package dev.su5ed.sinytra.connectorextras.jeibridge; import com.mojang.logging.LogUtils; -import dev.su5ed.sinytra.connectorextras.util.HackyModuleInjector; import net.minecraftforge.fml.common.Mod; import org.slf4j.Logger; @@ -9,9 +8,4 @@ public class JEIBridge { private static final Logger LOGGER = LogUtils.getLogger(); public static final String JEI_MODID = "jei"; - - public static void injectModule() { - LOGGER.info("Injecting JEI API classes"); - HackyModuleInjector.injectModuleSources(JEI_MODID, JEIBridge.class.getResource("/relocate")); - } } diff --git a/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/mixin/MainEntrypointMixin.java b/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/mixin/MainEntrypointMixin.java deleted file mode 100644 index 64c9ed0..0000000 --- a/jei-bridge/src/main/java/dev/su5ed/sinytra/connectorextras/jeibridge/mixin/MainEntrypointMixin.java +++ /dev/null @@ -1,15 +0,0 @@ -package dev.su5ed.sinytra.connectorextras.jeibridge.mixin; - -import dev.su5ed.sinytra.connectorextras.jeibridge.JEIBridge; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin({net.minecraft.client.main.Main.class, net.minecraft.server.Main.class}) -public abstract class MainEntrypointMixin { - @Inject(method = "main", at = @At("HEAD"), remap = false) - private static void beforeGameLaunch(String[] strings, CallbackInfo ci) { - JEIBridge.injectModule(); - } -} diff --git a/jei-bridge/src/main/resources/mixins.jeibridge.json b/jei-bridge/src/main/resources/mixins.jeibridge.json index 1a01c23..46bfbb3 100644 --- a/jei-bridge/src/main/resources/mixins.jeibridge.json +++ b/jei-bridge/src/main/resources/mixins.jeibridge.json @@ -5,7 +5,6 @@ "package": "dev.su5ed.sinytra.connectorextras.jeibridge.mixin", "plugin": "dev.su5ed.sinytra.connectorextras.jeibridge.JEIBridgeMixinPlugin", "mixins": [ - "ForgePluginFinderMixin", - "MainEntrypointMixin" + "ForgePluginFinderMixin" ] }