Closed RedBeast1959 closed 2 years ago
Really the error would be something more related to Better Furnaces Reforged, which uses compatibility with the Project MMO mod when it is enabled, but something strange is that this mod is "detected" when using Fuzss mods. I will observe more what could be causing this incompatibility with this author's mods.
I analyzed it better now, and it is not my mod that is causing this crash, see in the latest that the problem that resulted in the crash was not the compatibility of my mod with Project MMO, but the EasyAnvils mod
Good news, I managed to fix the crash caused by EasyAnvils, which was an incompatibility on both sides, and I will post the fixed version soon
It's not an incompatibility lol Your mod flat out crashes every mod that registers block entity renderers, also Storage Drawers, Quark, etc., not just mine.
I described what's going wrong with your mod in this comment (which is also linked above): https://github.com/Fuzss/easyanvils/issues/2#issuecomment-1267389368
Your mod is completely broken currently, even when it's the only mod installed (all items are set to air since the registry has been reverted to vanilla due to the crash during registration from your mod).
Here is the relevant stacktrace in case you haven't found it in the log:
[09Okt.2022 20:28:13.499] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: harmonised/pmmo/api/events/FurnaceBurnEvent
Index: 4
Listeners:
0: NORMAL
1: ASM: class wily.betterfurnaces.init.Registration registerBlockItems(Lnet/minecraftforge/registries/RegisterEvent;)V
2: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@481fa6af handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V
3: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@2673ded1 handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V
4: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@19fd85c4 handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V
5: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@360a4288 handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V
6: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@6282693a handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V
7: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@5a3fa6ed handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V
java.lang.NoClassDefFoundError: harmonised/pmmo/api/events/FurnaceBurnEvent
at TRANSFORMER/betterfurnacesreforged@1.19.2-1.0.2/wily.betterfurnaces.init.Registration.lambda$static$4(Registration.java:72)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.DeferredRegister.lambda$addEntries$1(DeferredRegister.java:388)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.RegisterEvent.register(RegisterEvent.java:59)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:388)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:330)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.__EventDispatcher_handleEvent_RegisterEvent.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
at LAYER PLUGIN/javafmllanguage@1.19.2-43.1.15/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:107)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.lambda$postEventWithWrapInModOrder$35(ModLoader.java:315)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:225)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.postEventWithWrapInModOrder(ModLoader.java:313)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:340)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:207)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:207)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:185)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:185)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111)
at TRANSFORMER/forge@43.1.15/net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91)
at TRANSFORMER/minecraft@1.19.2/net.minecraft.client.Minecraft.<init>(Minecraft.java:468)
at TRANSFORMER/minecraft@1.19.2/net.minecraft.client.main.Main.m_239872_(Main.java:176)
at TRANSFORMER/minecraft@1.19.2/net.minecraft.client.main.Main.main(Main.java:51)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at MC-BOOTSTRAP/fmlloader@1.19.2-43.1.15/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
at cpw.mods.bootstraplauncher@1.1.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
Caused by: java.lang.ClassNotFoundException: harmonised.pmmo.api.events.FurnaceBurnEvent
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 41 more
In case you need more information, below is the lambda that's mentioned in the stacktrace.
https://github.com/Wilyicaro/BetterFurnacesReforged/blob/7e33d9bb03f4e20da63a414544662cb95bf75c5b/src/main/java/wily/betterfurnaces/init/Registration.java#L72
It leads to the issue which is here: https://github.com/Wilyicaro/BetterFurnacesReforged/blob/7e33d9bb03f4e20da63a414544662cb95bf75c5b/src/main/java/wily/betterfurnaces/blockentity/AbstractSmeltingBlockEntity.java#L855
You cannot reference an optional classes (harmonised.pmmo.api.events.FurnaceBurnEvent
and harmonised.pmmo.events.impl.FurnaceHandler
) like that, the classloader will attempt to load them when loading your AbstractSmeltingBlockEntity
class no matter what, the if
block doesn't help with that. Calling optional classes needs to happen in a separate class (anonymous is enough), that you can then reference from inside the if
block I linked.
private static synthetic lambda$static$4()Lnet/minecraft/world/level/block/entity/BlockEntityType;
L0
LINENUMBER 72 L0
INVOKEDYNAMIC m_155267_()Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier; [
// handle kind 0x6 : INVOKESTATIC
java/lang/invoke/LambdaMetafactory.metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
// arguments:
(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)Lnet/minecraft/world/level/block/entity/BlockEntity;,
// handle kind 0x8 : NEWINVOKESPECIAL
wily/betterfurnaces/blockentity/IronFurnaceBlockEntity.<init>(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)V,
(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)Lwily/betterfurnaces/blockentity/IronFurnaceBlockEntity;
]
ICONST_1
ANEWARRAY net/minecraft/world/level/block/Block
DUP
ICONST_0
GETSTATIC wily/betterfurnaces/init/Registration.IRON_FURNACE : Lnet/minecraftforge/registries/RegistryObject;
INVOKEVIRTUAL net/minecraftforge/registries/RegistryObject.get ()Ljava/lang/Object;
CHECKCAST net/minecraft/world/level/block/Block
AASTORE
INVOKESTATIC net/minecraft/world/level/block/entity/BlockEntityType$Builder.m_155273_ (Lnet/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier;[Lnet/minecraft/world/level/block/Block;)Lnet/minecraft/world/level/block/entity/BlockEntityType$Builder;
LDC "iron_furnace"
INVOKESTATIC wily/betterfurnaces/init/Registration.blockEntityType (Ljava/lang/String;)Lcom/mojang/datafixers/types/Type;
INVOKEVIRTUAL net/minecraft/world/level/block/entity/BlockEntityType$Builder.m_58966_ (Lcom/mojang/datafixers/types/Type;)Lnet/minecraft/world/level/block/entity/BlockEntityType;
ARETURN
MAXSTACK = 5
MAXLOCALS = 0
Dude, I already fixed the problem, but before when I fixed the PMMO compatibility, and consequently added this crash, I didn't imagine that I would have a problem with optional classes referenced due to Forge events, thanks for the explanation
It's not an incompatibility lol Your mod flat out crashes every mod that registers block entity renderers, also Storage Drawers, Quark, etc., not just mine.
I described what's going wrong with your mod in this comment (which is also linked above): Fuzss/easyanvils#2 (comment)
Your mod is completely broken currently, even when it's the only mod installed (all items are set to air since the registry has been reverted to vanilla due to the crash during registration from your mod).
Here is the relevant stacktrace in case you haven't found it in the log:
[09Okt.2022 20:28:13.499] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/]: Exception caught during firing event: harmonised/pmmo/api/events/FurnaceBurnEvent Index: 4 Listeners: 0: NORMAL 1: ASM: class wily.betterfurnaces.init.Registration registerBlockItems(Lnet/minecraftforge/registries/RegisterEvent;)V 2: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@481fa6af handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V 3: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@2673ded1 handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V 4: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@19fd85c4 handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V 5: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@360a4288 handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V 6: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@6282693a handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V 7: ASM: net.minecraftforge.registries.DeferredRegister$EventDispatcher@5a3fa6ed handleEvent(Lnet/minecraftforge/registries/RegisterEvent;)V java.lang.NoClassDefFoundError: harmonised/pmmo/api/events/FurnaceBurnEvent at TRANSFORMER/betterfurnacesreforged@1.19.2-1.0.2/wily.betterfurnaces.init.Registration.lambda$static$4(Registration.java:72) at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.DeferredRegister.lambda$addEntries$1(DeferredRegister.java:388) at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.RegisterEvent.register(RegisterEvent.java:59) at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:388) at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:330) at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.__EventDispatcher_handleEvent_RegisterEvent.invoke(.dynamic) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) at LAYER PLUGIN/javafmllanguage@1.19.2-43.1.15/net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:107) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.lambda$postEventWithWrapInModOrder$35(ModLoader.java:315) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModList.forEachModInOrder(ModList.java:225) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.postEventWithWrapInModOrder(ModLoader.java:313) at TRANSFORMER/forge@43.1.15/net.minecraftforge.registries.GameData.postRegisterEvents(GameData.java:340) at TRANSFORMER/forge@43.1.15/net.minecraftforge.common.ForgeStatesProvider.lambda$new$4(ForgeStatesProvider.java:25) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$23(ModLoader.java:207) at java.base/java.util.Optional.ifPresent(Optional.java:178) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:207) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$14(ModLoader.java:185) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at LAYER PLUGIN/fmlcore@1.19.2-43.1.15/net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:185) at TRANSFORMER/forge@43.1.15/net.minecraftforge.client.loading.ClientModLoader.lambda$begin$1(ClientModLoader.java:91) at TRANSFORMER/forge@43.1.15/net.minecraftforge.client.loading.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:111) at TRANSFORMER/forge@43.1.15/net.minecraftforge.client.loading.ClientModLoader.begin(ClientModLoader.java:91) at TRANSFORMER/minecraft@1.19.2/net.minecraft.client.Minecraft.<init>(Minecraft.java:468) at TRANSFORMER/minecraft@1.19.2/net.minecraft.client.main.Main.m_239872_(Main.java:176) at TRANSFORMER/minecraft@1.19.2/net.minecraft.client.main.Main.main(Main.java:51) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at MC-BOOTSTRAP/fmlloader@1.19.2-43.1.15/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.run(Launcher.java:106) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/cpw.mods.modlauncher@10.0.8/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at cpw.mods.bootstraplauncher@1.1.2/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) Caused by: java.lang.ClassNotFoundException: harmonised.pmmo.api.events.FurnaceBurnEvent at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ... 41 more
I said that it was an incompatibility to make it clearer for him the understanding that the crash occurs due to the influence of both mods, I didn't mean that it was precisely because of your mod, nor that my mod wasn't literally broken if loaded without the PMMO
Fixed in 1.19.2-1.0.3
1.19.2 - Forge 43.1.32
PuzzlesLib-v4.3.9-1.19.2-Forge.jar EasyAnvils-v4.0.1-1.19.2-Forge.jar BetterFurnacesReforged-1.19.2-1.0.2.jar
With Fuzss' mods(PuzzlesLib, Easy Anvils, Enchanter Infuser etc), Better Furnaces Reforged immediately crashes on start.
According to Fuzss' mods dev, Better Furnaces crashes the Forge event for registering content (blocks/items/etc). (https://github.com/Fuzss/easyanvils/issues/2#issuecomment-1267389368)
Here's my crash / latest logs for this issue https://gist.github.com/RedBeast1959/d442e2c215d80d40aef7dac82a95f711 (crash) https://gist.github.com/RedBeast1959/d0f92e674aa367cace8230665c43369b (lastest)