I am modding a minecraft mod 1.16.5 [message #1843711] |
Sun, 15 August 2021 06:32  |
Eclipse User |
|
|
|
package com.SAO.SAOMod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
@Mod("SAOMod")
public class SAOMod {
public static final Logger LOGGER = LogManager.getLogger();
public static final String Mod_ID = "SAOMod";
public SAOMod() {
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
MinecraftForge.EVENT_BUS.register(this);
}
here is my code when I try to run it, it open the minecraft success ,but the window of minecraft soon close and show me a warning message:
Exception in thread "main" [14:05:46] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1069]: at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
Can someone help me please! thx
Attachment: SAOMod.java
(Size: 0.58KB, Downloaded 222 times)
|
|
|
Re: I am modding a minecraft mod 1.16.5 [message #1858831 is a reply to message #1843711] |
Tue, 25 April 2023 14:36   |
Eclipse User |
|
|
|
Sorry to hear you're having trouble with your SAOMod code. It looks like you're registering your mod with the MinecraftForge event bus, which is a good start.
As for the error message you're getting, it's a bit hard to decipher. Have you tried running your code with some debugging enabled? That might give you more information about what's going wrong.
Also, have you checked out https://minecraft.menu for some troubleshooting tips? They might have some more specific advice for your situation.
Hang in there and keep tinkering with your code! You'll get it working eventually.
[Updated on: Tue, 02 May 2023 09:32] by Moderator Report message to a moderator
|
|
|
Re: I am modding a minecraft mod 1.16.5 [message #1858921 is a reply to message #1858831] |
Mon, 01 May 2023 15:53   |
Eclipse User |
|
|
|
You could try to enable debug logging in your mod. This can help you identify the exact location of the error and provide more information on the cause of the problem. To enable debug logging, you can modify the code of your mod to add the following line:
System.setProperty("log4j.configurationFile", "<path_to_your_log4j_config_file>");
Make sure to replace <path_to_your_log4j_config_file> with the actual path to your log4j configuration file.
|
|
|
|
Re: I am modding a minecraft mod 1.16.5 [message #1862876 is a reply to message #1858921] |
Wed, 03 January 2024 13:22   |
Eclipse User |
|
|
|
Kabiru Usman wrote on Mon, 01 May 2023 15:53You could try to enable debug logging in your mod. This can help you identify the exact location of the error and provide more information on the cause of the problem. To enable debug logging, you can modify the code of your mod to add the following line:
System.setProperty("log4j.configurationFile", "<path_to_your_log4j_config_file>");
Make sure to replace <path_to_your_log4j_config_file> with the actual path to your log4j configuration file.
it worked for me as well
|
|
|
|
Powered by
FUDForum. Page generated in 0.08970 seconds