Fabric API

Fabric API

106M Downloads

[BUG] Elytra events cause log errors from illegal names

TropheusJ opened this issue ยท 4 comments

commented

java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/ClientPlayerEntityMixin
java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/PlayerEntityMixin
java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/LivingEntityMixin

These three classes have their paths specified incorrectly in their corresponding mixins.json file. It should be elytra.<class name>, not elytra/<class name>.
I'm not sure if these mixins are even applying.

FAPI: 0.45.0+1.18
loader: 0.12.11

commented

I can't reproduce this, at least in a development environment?

Can you post your log/latest.log, the versions you report this against shouldn't even load.
Fabric API 0.45.0+1.18 requires fabric-loader 0.12.12
https://github.com/FabricMC/fabric/blob/1.18/src/main/resources/fabric.mod.json
When I try to use loader 0.12.11 in a dev environment it forces loader 0.12.12 with fabric api 0.45.0+1.18

I'm not sure if these mixins are even applying.

If it can't find the classes it won't be applying them.

One thing I do know is that Sponge used to use the / format for class names internally but it was changed because the new forge loader started using the . names. But that was a few months ago.
There was also this recent change in the way file paths are handled by sponge mixin:
SpongePowered/Mixin#534
but I doubt that is relevant here since the classes will be in a jar uri?

commented

latest.log
Loader has been updated since report, but error still occurs.

commented

I can see what is different now.
You are using the java agent which does hotswapping of mixins while I was doing it from the command line.

[14:01:10] [main/WARN]: Catching java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/PlayerEntityMixin
java.lang.NoClassDefFoundError: IllegalName: net.fabricmc.fabric.mixin.entity.event.elytra/PlayerEntityMixin
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:886) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:1010) ~[?:?]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:874) ~[?:?]
	at org.spongepowered.tools.agent.MixinAgentClassLoader.addMixinClass(MixinAgentClassLoader.java:68) [sponge-mixin-0.10.7+mixin.0.8.4.jar:0.10.7+mixin.0.8.4]
	at org.spongepowered.tools.agent.MixinAgent.registerMixinClass(MixinAgent.java:181) [sponge-mixin-0.10.7+mixin.0.8.4.jar:0.10.7+mixin.0.8.4]
	at org.spongepowered.asm.mixin.transformer.MixinProcessor$1.onPrepare(MixinProcessor.java:528) [sponge-mixin-0.10.7+mixin.0.8.4.jar:0.10.7+mixin.0.8.4]
	at org.spongepowered.asm.mixin.transformer.MixinConfig.prepareMixins(MixinConfig.java:877) 

Somewhere in the agent processing it is missing some code that "fixes" the class name '/' -> '.'

Can you try running gradlew.bat runclient to confirm you don't get the error.

This is not an area I am very familiar with.
But, assuming the use of "/" is not invalid in the mixin configuration I guess this bug report belongs on the mixin project.
https://github.com/FabricMC/Mixin/issues

commented

after disabling the javaagent, the error is gone. This seems to be the case.