Mixin is a trait/mixin and bytecode weaving framework for Java using ASM
github.com
github.com
Oh. I was expecting something much more weird from the title, and that's a pretty confusing/misleading name for that.
So, OP, what made you mention this here now?
As someone else already replied, Mumfrey still practices private development and only pushes new code after his own extensive testing. He has long periods of "public" inactivity because code refactors and other changes can be delicate given the widespread usage of the library within the Minecraft modding ecosystem, and as such, he doesn't want the distraction that in-development can attract from said community.
The jep does not explain how to prepare to new Java bytecodes and future enhancements. Am i suppose to only run with the latest version of Java if i want to use that library ?
- Changing a constant within a target method https://github.com/SpongePowered/Sponge/blob/06ebd1d3479b9ed...
- Replacing a method call within a specific method https://github.com/SpongePowered/Sponge/blob/06ebd1d3479b9ed...
- Adding an interface and its implementation to the target class (in this case net.minecraft.world.entity.Entity will now implement org.spongepowered.api.entity.Entity and its methods) https://github.com/SpongePowered/Sponge/blob/06ebd1d3479b9ed...
There's a fair bit more that is possible that would otherwise require a fair bit more code wrangling with AspectJ or BytecodeBuddy to achieve the same effects.
This Mixin library is very useful, since it allows different mods to edit different parts of the same code without interfering for example.
It's also very easy to use compared to jvm bytecode manipulation, you just write a normal java function and put an annotation on it, and boom, now it runs right before line X inside of class Y, at runtime !