Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 06:32 Go to next message
XX Sun is currently offline XX SunFriend
Messages: 1
Registered: August 2021
Junior Member
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 169 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 Go to previous messageGo to next message
Chappy  Bee is currently offline Chappy BeeFriend
Messages: 2
Registered: April 2023
Junior Member
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]

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 Go to previous messageGo to next message
Kabiru Usman is currently offline Kabiru UsmanFriend
Messages: 42
Registered: April 2023
Member
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 09:30 Go to previous messageGo to next message
Chappy  Bee is currently offline Chappy BeeFriend
Messages: 2
Registered: April 2023
Junior Member
thanks for suggestion - <path_to_your_log4j_config_file>

[Updated on: Tue, 02 May 2023 09:31]

Report message to a moderator

Re: I am modding a minecraft mod 1.16.5 [message #1862876 is a reply to message #1858921] Wed, 03 January 2024 13:22 Go to previous messageGo to next message
Alayne Dabney is currently offline Alayne DabneyFriend
Messages: 2
Registered: May 2023
Junior Member
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 08:48 Go to previous message
Daniel Peck is currently offline Daniel PeckFriend
Messages: 1
Registered: October 2023
Junior Member
Replacing worked for me, managed to find it
Previous Topic:How to add package offline
Next Topic:Ctrl-h for search suddenly does nothing
Goto Forum:
  


Current Time: Fri Mar 01 02:22:31 GMT 2024

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

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

Back to the top