Skip to main content



      Home
Home » Newcomers » Newcomers » I am modding a minecraft mod 1.16.5
I am modding a minecraft mod 1.16.5 [message #1843711] Sun, 15 August 2021 02:32 Go to next message
Eclipse UserFriend
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 240 times)
Re: I am modding a minecraft mod 1.16.5 [message #1858831 is a reply to message #1843711] Tue, 25 April 2023 10:36 Go to previous messageGo to next message
Eclipse UserFriend
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 05:32] by Moderator

Re: I am modding a minecraft mod 1.16.5 [message #1858921 is a reply to message #1858831] Mon, 01 May 2023 11:53 Go to previous messageGo to next message
Eclipse UserFriend
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 #1858929 is a reply to message #1858921] Tue, 02 May 2023 05:30 Go to previous messageGo to next message
Eclipse UserFriend
thanks for suggestion - <path_to_your_log4j_config_file>

[Updated on: Tue, 02 May 2023 05:31] by Moderator

Re: I am modding a minecraft mod 1.16.5 [message #1862876 is a reply to message #1858921] Wed, 03 January 2024 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Kabiru Usman wrote on Mon, 01 May 2023 15:53
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.

it worked for me as well
Re: I am modding a minecraft mod 1.16.5 [message #1863351 is a reply to message #1862876] Mon, 29 January 2024 03:48 Go to previous message
Eclipse UserFriend
Replacing worked for me, managed to find it
Previous Topic:How to add package offline
Next Topic:How to create a JDT classname list in View Part
Goto Forum:
  


Current Time: Sat Apr 19 13:58:19 EDT 2025

Powered by FUDForum. Page generated in 0.09373 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top