MixinBootstrap

MixinBootstrap

15M Downloads

New Maintainer of JEID needs help with MixinBootstrap bug

Mysticpasta1 opened this issue ยท 29 comments

commented

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

commented

ah great

commented

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

commented

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

commented

idk what this means

commented

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

commented

ok but how do I make it to where it is used as a dependency inside the mod itself

commented

You don't, MixinBootstrap is not technically a Forge mod, It loads before Forge in order to add the Mixin Library to Minecraft.

commented

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; }
}

commented

it is a thorn in my side atm

commented

this mod heavy relies on mixin being their before construction

commented

should I add the commentted out line or not

commented

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();"

commented

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

commented

Use Mixin 0.8.3 to fix that error

commented

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

commented

I think I know what happen to different mixin libraries collided and exploded

commented

ok how do I use your mod as a library for mixin

commented

because apparently mixin doesn't like to load correctly anymore

commented

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

commented

I've made some changes, I haven't had a chance to test them https://github.com/LXGaming/JustEnoughIDs/tree/fixes

commented

I noticed you fork JEID do you want me to push the recent changes

commented

if you can send a PR when done I will merge it

commented

do you want me to just copy it or wait on a PR from you, just curious

commented

I'll make a PR

commented

YAY

commented

btw do you want to join dimensional doors discord btw or are you good

commented

thought I'd ask :D

commented

after the PR is merge I will make a jar put it on CF and then I can close all these issue reports :D

commented

so is it working?