diff --git a/build.gradle b/build.gradle index fb917eea..6a439003 100644 --- a/build.gradle +++ b/build.gradle @@ -142,13 +142,15 @@ shadowJar { manifest { attributes([ 'Manifest-Version': 1.1, + 'FMLCorePluginContainsFMLMod': 'true', + 'FMLCorePlugin': 'xaeroplus.mixin.MixinLoaderForge', 'ForceLoadAsMod': 'true', "Specification-Title": "XaeroPlus", "Specification-Vendor": "rfresh2", "Specification-Version": "1", "Implementation-Title": project.name, "Implementation-Version": "${version}", - "Implementation-Vendor" :"rfresh", + "Implementation-Vendor" :"rfresh2", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } diff --git a/src/main/java/xaeroplus/mixin/MixinLoaderForge.java b/src/main/java/xaeroplus/mixin/MixinLoaderForge.java index c63cf6cd..dad61878 100644 --- a/src/main/java/xaeroplus/mixin/MixinLoaderForge.java +++ b/src/main/java/xaeroplus/mixin/MixinLoaderForge.java @@ -1,25 +1,17 @@ package xaeroplus.mixin; import net.minecraftforge.fml.relauncher.FMLLaunchHandler; -import org.spongepowered.asm.launch.MixinBootstrap; -import org.spongepowered.asm.mixin.MixinEnvironment; -import org.spongepowered.asm.mixin.Mixins; +import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; import zone.rong.mixinbooter.IEarlyMixinLoader; -import zone.rong.mixinbooter.MixinLoader; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; +import java.util.Map; -@MixinLoader -public class MixinLoaderForge implements IEarlyMixinLoader { +public class MixinLoaderForge implements IEarlyMixinLoader, IFMLLoadingPlugin { public MixinLoaderForge() { - MixinBootstrap.init(); - if (FMLLaunchHandler.isDeobfuscatedEnvironment()) { - Mixins.addConfigurations("mixins.baritone.json"); - } - Mixins.addConfigurations("mixins.xaeroplus.json"); - MixinEnvironment.getDefaultEnvironment().setObfuscationContext("searge"); } @Override @@ -31,4 +23,30 @@ public List getMixinConfigs() { } return list; } + + @Override + public String[] getASMTransformerClass() { + return new String[0]; + } + + @Override + public String getModContainerClass() { + return null; + } + + @Nullable + @Override + public String getSetupClass() { + return null; + } + + @Override + public void injectData(final Map data) { + + } + + @Override + public String getAccessTransformerClass() { + return null; + } }