Jump to content

Recommended Posts

Posted

Hey guys,

 

Simple question. Can I use Classes from an dependency libary from my mod in the preInit() function of said mod?

My idea was to create a libary that would help me register my blocks, items, etc.

Can't seem to get it to work.

I can post my code later if needed.

 

Greetings,

  Pretty new modder

Posted

Hm, it's possible that I messed up on the gradle dependency, for when I try to start minecraft a noclassfound error pops up. I thought that was because the classes of the libary weren't injected. Need to try again tomorrow.

Posted

I use Eclipse. My workspace is like this:

Workspace\Forge

                  \Baselib

                  \BaseExample

 

BaseExample uses Baselib as dependency. Baselib and BaseExample have their own gradle folder an gradle.bat.

I'll upload build.gradle as soon as I'm home.

 

 

Posted

Doesn't seem to work. I put both .jar in the mods folder of the forge/eclipse/mods to test them.

Here is the crash from Minecraft:

 

  Reveal hidden contents

 

Posted

There´s another error now, but i tink that´s from my mod:

 

  Reveal hidden contents

 

Posted

Yeaaaaaaaaaa i kinda found my error. I build the mods, and put the build .jars in the mods folder of the forge project. Not the best  idea. In the normal Minecraft´s mod folder it works.

Posted

Thanks. I got everything workin. Just one last question: If I have BaseExample that needs BaseLib, i need to compile baselib.jar, add it to the libs folder, and ádd it to the build.gradle file? Or is there a other way?

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.

Announcements



×
×
  • Create New...

Important Information

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