New Maintainer of JEID needs help with MixinBootstrap bug
Mysticpasta1 opened this issue ยท 29 comments
I'm the new maintainer of JEID, I was wondering if you had discord? I'm having trouble with fixing the current JEID bug with MixinBootstrap. I was wondering if you can help me fix it. Current issue : #48
This is with latest JEID 1.0.3-55
and latest MixinBootstrap 1.1.0-1.12.2
My discord is Hauntedpasta1#8200
Hope to get this fix soon :D
You can use the following to workaround the class being package-private
Class<?> mixinProcessorClass = Class.forName("org.spongepowered.asm.mixin.transformer.MixinProcessor");
then simply replace any instances of MixinProcessor.class
with mixinProcessorClass
ok that was it but new error
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.spongepowered.asm.launch.GlobalProperties.get(Lorg/spongepowered/asm/launch/GlobalProperties$Keys;)Ljava/lang/Object;" the class loader (instance of net/minecraft/launchwrapper/LaunchClassLoader) of the current class, org/spongepowered/asm/mixin/MixinEnvironment, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, org/spongepowered/asm/launch/GlobalProperties, have different Class objects for the type org/spongepowered/asm/launch/GlobalProperties$Keys used in the signature
You should be able to use Mixin 0.8.3, Mixin 0.8.4+ has classes in it which cause ASM in Forge 1.12.2 to explode.
If you want to use MixinBootstrap, don't compile Mixin in your mod jar and just mark MixinBootstrap as a dependency on CurseForge
ok but how do I make it to where it is used as a dependency inside the mod itself
You don't, MixinBootstrap is not technically a Forge mod, It loads before Forge in order to add the Mixin Library to Minecraft.
oh on a side note how do I get this bit working exactly the line that is comment out typical crashes on any mixin version
package org.dimdev.jeid;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
import org.spongepowered.asm.launch.MixinBootstrap;
import org.spongepowered.asm.mixin.Mixins;
import javax.annotation.Nullable;
import java.util.Map;
@IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion)
@IFMLLoadingPlugin.SortingIndex(-7500)
@IFMLLoadingPlugin.Name("JustEnoughIDs Extension Plugin")
//@IFMLLoadingPlugin.TransformerExclusions("org.dimdev.jeid.")
public class JEIDLoadingPlugin implements IFMLLoadingPlugin {
public JEIDLoadingPlugin() {
//MixinBootstrap.init(); //this line is crashy
Utils.LOGGER.info("Initializing JustEnoughIDs core mixins");
Mixins.addConfiguration("mixins.jeid.core.json");
Utils.LOGGER.info("Initializing JustEnoughIDs initialization mixins");
Mixins.addConfiguration("mixins.jeid.init.json");
}
@Override public String[] getASMTransformerClass() { Obf.loadData(); return new String[]{ "org.dimdev.jeid.JEIDTransformer" }; }
@Override public String getModContainerClass() { return null; }
@Nullable @Override public String getSetupClass() { return null; }
@Override public void injectData(Map<String, Object> data) {}
@Override public String getAccessTransformerClass() { return null; }
}
What is the crash you are getting?, Also the MixinTweaker (https://github.com/DimensionalDevelopment/JustEnoughIDs/blob/e74921c63539db027816741cb282bc0ecb09601c/build.gradle#L154) handled the initialization of Mixin so you may not require "MixinBootstrap.init();"
it isn't a crash per say more a debug that cause the mod to not load into the game https://gist.github.com/Mysticpasta1/a960de264fc45b13ccc6411769484d3f
ok great but how do I do so when planning on using your mod
like this implementation "org.spongepowered:mixin:0.8.3"
and load MixinBootstrap in the mods folder
I think I know what happen to different mixin libraries collided and exploded
with just your mod in the mod folder in the dev environment and no mixin library loaded this error occurs
Caused by: java.lang.NoClassDefFoundError: org/spongepowered/asm/mixin/Mixins
I've made some changes, I haven't had a chance to test them https://github.com/LXGaming/JustEnoughIDs/tree/fixes
after the PR is merge I will make a jar put it on CF and then I can close all these issue reports :D