Olafski / FastLeafDecay

Minecraft mod that provides faster leaf decay.
21 stars 6 forks source link

Crashes in Minecraft 1.19 Forge #59

Closed 1-1037 closed 2 years ago

1-1037 commented 2 years ago

Minecraft crashes before even getting to the main menu on the latest 1.19 Forge version, even if it is the only mod installed.

Steps to Reproduce:

  1. Install latest 1.19 forge version (41.0.98)
  2. Install Fast Leaf Decay
  3. Launch Minecraft
  4. Game crash

Versions:

Minecraft: 1.19 3D Skin Layers: FastLeafDecay-29 Forge: 41.0.98

Screenshot: image Crash Log: crash-2022-07-14_02.40.14-fml.txt

neilpeel13 commented 2 years ago

Same here.

BudgieY commented 2 years ago

I also reproduced that bug. Let me show you some extract from debug.log:

[157��2022 17:07:02.105] [modloading-worker-0/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Failed to create mod instance. ModID: fastleafdecay, class net.olafkeijsers.fastleafdecay.FastLeafDecay
java.lang.reflect.InvocationTargetException: null
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:68) ~[javafmllanguage-1.19-41.0.98.jar%23146!/:?]
    at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:121) ~[fmlcore-1.19-41.0.98.jar%23145!/:?]
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) [?:?]
    at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) [?:?]
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) [?:?]
    at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) [?:?]
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) [?:?]
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) [?:?]
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) [?:?]
Caused by: java.lang.NoClassDefFoundError: net/minecraftforge/event/world/BlockEvent$NeighborNotifyEvent
    at net.olafkeijsers.fastleafdecay.FastLeafDecay.<init>(FastLeafDecay.java:39) ~[FastLeafDecay-29.jar%23143!/:29]
    ... 14 more
Caused by: java.lang.ClassNotFoundException: net.minecraftforge.event.world.BlockEvent$NeighborNotifyEvent
    at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) ~[securejarhandler-2.1.4.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) ~[securejarhandler-2.1.4.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at net.olafkeijsers.fastleafdecay.FastLeafDecay.<init>(FastLeafDecay.java:39) ~[FastLeafDecay-29.jar%23143!/:29]
    ... 14 more
Olafski commented 2 years ago

Thanks people! I will check it out and try to have a fix soon.

MelanX commented 2 years ago

Should be something from here: https://github.com/MinecraftForge/MinecraftForge/pull/8786 (guide linked in this PR) Or here: https://github.com/MinecraftForge/MinecraftForge/pull/8840

Sanastae commented 2 years ago

Like a lot of 1.19 mods, this issue has appeared since forge 41.0.63 and newer I have this issue with forge 41.0.107 too. Hope you find a fix soon :D

Olafski commented 2 years ago

Thanks for the hints, @MelanX! I managed to fix my mod. Version 30 is on CurseForge.

Gotta say, I understand the want to refactor on their side but it's quite tedious to have to change the location of random classes in the middle of a Minecraft version.

MelanX commented 2 years ago

Until the first recommended build (41.1.0), there are breaking changes allowed. This applies for each new major Forge release. The forge team wanted to delay these changes until 1.19.1 is released but during FAP, the viewers decided to break these things earlier. Second reason to do it now was that 1.19.1 should already be released but was delayed by an unknown time.

So… every time we code mods for x.0.x released of Forge, we need to expect breaking changes.

Just as information, maybe you already knew that :D

Olafski commented 2 years ago

I did not know that, but it makes sense. I realized later that I chose to support a "pre release" version.

It's a dilemma - I get requests to support new Minecraft versions on CurseForge, then I comply and have to change it shortly thereafter. Luckily this isn't a big mod though ;-)