Jump to content

Launcher using wrong constructor


matwaua

Recommended Posts

I am following a tutorial for modding minecraft 1.20.1, and while running the mod with the minecraft of the idea, no errors was present but, when I switched to real minecraft, it started to want a default constructor "public ZeroToAutomation()" instead of the one recomended by the video "public ZeroToAutomation(FMLJavaModLoadingContext context) {...}", and I can't use the default constructor because I need the FMLJavaModLoadingContext to register the blocks and items.

 

The problem is at: "net/myself/zerotoautomation/ZeroToAutomation.java"

the file contains the default constructor, "Logger"s, and the code for the mod

the defaut constructor was added after an error requesting it

the Loggers was used to see which methods/constructors was used by the Launcher

 

things that I tried to fix the issue:

remove the default constructor, but an error appeared "net.myself.zerotoautomation.ZeroToAutomation.<init>()", and nothing else on the class runs

adding an "public static void init()" method, but it changed nothing

 

The mod files:

https://github.com/Matwaua/Zero_To_Automation/tree/not-finished

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.