Fruit Trees 🍊

Fruit Trees 🍊

4M Downloads

Mixin connector load minecraft classes too early.

IzzelAliz opened this issue · 6 comments

commented

https://github.com/Snownee/FruitTrees/blob/6ede82fde49f9d65eb5187b1dec09fb9db4dca3e/src/main/java/snownee/fruits/mixin/Connector.java#L13-L15

These codes access normal mod classes, which contains references to net.minecraft classes and loads them in a very early stage.

Stack info

commented

虽然我这里是没啥报错了,但是日志还是显示加载了一些 mc 的类

我觉得可以把引用的 Fruits 那两个字段放到 connector 来,logger 啥的直接在 connector 里面开个新的

commented

能否提供一下加载了哪些类?

commented
[18??2020 13:58:31.405] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Attempting to load snownee.fruits.mixin.Connector

[18??2020 13:58:31.407] [main/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar URL modjar://fruittrees/snownee/fruits/mixin/Connector.class got resource snownee/fruits/mixin/Connector.class true

[18??2020 13:58:31.409] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Delegating to parent java.lang.Object

[18??2020 13:58:31.414] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Loaded transform target snownee.fruits.mixin.Connector from modjar://fruittrees/snownee/fruits/mixin/Connector.class reason classloading

[18??2020 13:58:31.416] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Class loaded for snownee.fruits.mixin.Connector

[18??2020 13:58:31.417] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [snownee.fruits.mixin.Connector]

[18??2020 13:58:31.476] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Attempting to load snownee.fruits.Fruits

[18??2020 13:58:31.478] [main/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar URL modjar://fruittrees/snownee/fruits/Fruits.class got resource snownee/fruits/Fruits.class true

[18??2020 13:58:31.480] [main/DEBUG] [mixin/]: Checking for additional mixins for MixinEnvironment[PREINIT]

[18??2020 13:58:31.481] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Delegating to parent java.lang.Object

[18??2020 13:58:31.485] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Loaded transform target snownee.fruits.Fruits from modjar://fruittrees/snownee/fruits/Fruits.class reason classloading

[18??2020 13:58:31.493] [main/TRACE] [cpw.mods.modlauncher.TransformingClassLoader/CLASSLOADING]: Class loaded for snownee.fruits.Fruits

[18??2020 13:58:31.494] [main/INFO] [Fruit Trees/]: Invoking Mixin Connector

[18??2020 13:58:31.496] [main/TRACE] [net.minecraftforge.fml.loading.ModJarURLHandler/CORE]: Loading modjar URL modjar://fruittrees/assets/fruittrees/fruittrees.mixins.json got resource assets/fruittrees/fruittrees.mixins.json true

日志上来看现在可以了

commented

??不是说加载了mc的类吗?

commented

是新构建没问题了【
可以用 -Dforge.logging.debugFile.level=trace -Dforge.logging.marker.classloading=ACCEPT -Dforge.logging.markers=CLASSLOADING 自行测试