I'm new to Minecraft Coding and Forge. I'm repeatedly getting this error that FML (Forge Mod Loader) is loading causing errors. I have FML for 1.12.2 MC and Forge Version 1.12.2-14.23.5.2854 I also tried Forge version 1.12.2-14.23.5.2855, but the same errors were thrown. I am using JRE 1.8.0_251. My IDE is Eclipse 2020-12
And when I do "runClient.launch" which launches Minecraft Client 1.12.2, it shows Constructing Mods, but when it comes to 3rd step, then bam! It crashes In preferences Tab in eclipse, I have selected the Correct JRE. Pls help me regarding this issue.
JVM Args
-Xmx2G
Error Log -
Description: There was a severe problem during mod loading that has caused the game to fail
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Forge Mod Loader (FML)
Caused by: java.lang.NullPointerException
at net.minecraftforge.fml.common.network.NetworkRegistry.newChannel(NetworkRegistry.java:207)
at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.registerChannel(FMLNetworkHandler.java:185)
at net.minecraftforge.fml.common.FMLContainer.modConstruction(FMLContainer.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
at net.minecraft.client.Minecraft.init(Minecraft.java:467)
at net.minecraft.client.Minecraft.run(Minecraft.java:378)
at net.minecraft.client.main.Main.main(SourceFile:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraftforge.legacydev.Main.start(Main.java:86)
at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 125114560 bytes (119 MB) / 378011648 bytes (360 MB) up to 935854080 bytes (892 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.5.2854 5 mods loaded, 5 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
| State | ID | Version | Source | Signature |
|:----- |:---------- |:------------ |:----------------------------------------------------------- |:--------- |
| LC | minecraft | 1.12.2 | minecraft.jar | None |
| LC | mcp | 9.42 | minecraft.jar | None |
| LE | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2854_mapped_snapshot_20171003-1.12.jar | None |
| L | forge | 14.23.5.2854 | forge-1.12.2-14.23.5.2854_mapped_snapshot_20171003-1.12.jar | None |
| L | examplemod | 1.0 | main | None |
Loaded coremods (and transformers):
GL info: ' Vendor: 'Intel' Version: '3.1.0 - Build 9.17.10.4229' Renderer: 'Intel(R) HD Graphics 3000'
[16:30:21] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:553]: #@!@# Game crashed! Crash report saved to: #@!@# D:\1.12.2\run\.\crash-reports\crash-2021-07-14_16.30.21-client.txt
NOTE: This fix may not be a permanent or good solution to the problem but I have found it to fix mine so try at your own risk.
With no mention of what version of ForgeGradle you are using, I will have to assume that it is version 3.0 or higher.
For anyone experiencing the same issue for ForgeGradle version 5.1.73 or higher, using Forge version 1.12.2-14.23.5.2860 the following worked for me:
NOTE: I previously tried this method but it stopped working suddenly. If that happens to you, I suggest trying solution 2 or some of the other answers on this question such as clearing the Gradle cache or running a clean build.
Add the following into the configuration
block in your build.gradle
file:
configurations.configureEach {
exclude group: "net.minecraftforge", module: "mergetool"
}
This will remove the mergetool
dependency which seems to be causing issues.
Add the following to the bottom of your dependencies
block:
implementation ("net.minecraftforge:mergetool:0.2.3.3") { force = true }
This will force Gradle to use this particular version of MergeTool
Some may have used this old solution to fix IntelliJ not copying resources properly with Gradle. The new solution is to add this block to your build.gradle
:
legacy {
fixClasspath = true
}
So you must now remove the following from the top of your build.gradle
:
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = true
}
}
subprojects {
apply plugin: 'idea'
}
And you must also switch to building with Gradle:
File
> Settings...
(Or, Ctrl + Alt + S) > Build, Execution, Deployment
> Build Tools
> Gradle
Build and run using:
and Run tests using:
to Gradle
According to Issue #748 on MinecraftForge/ForgeGradle by tie, there seems to be an issue where the MergeTool dependency loads first before FML properly does, so Side
is overwritten with a version which contains a BUKKIT
entry which FML does not expect. (Normally, it only contains SERVER
and CLIENT
and only instantiates channels for the two)
I have not experienced any issues with removing this dependency yet, however if I find anything I will mention it here in the future.
I have tested this on Windows 10 build 21H2 19044.2728, with Gradle version 7.4.2, ForgeGradle version 5.1.73, Forge version 1.12.2-14.23.5.2860, Mappings channel "stable" version 39-1.12
Side
is gaining a BUKKIT
enum entry immaculately. I will research this further and inspect why this is happening.