Jump to content

[1.19.2] Adding your mod to dependencies


DragonBorn

Recommended Posts

I try add my mod(mavenLocal) to in the dependency, in another my mod:

minecraftLibrary("net.dragonborn:lupin:1.12.4") {
    exclude("net.minecraftforge")
}

And i get exception, when open my screen:

Spoiler

java.lang.NoClassDefFoundError: net/minecraft/client/gui/screens/Screen
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] {}
    at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?] {}
    at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:119) ~[securejarhandler-2.1.4.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-2.1.4.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-2.1.4.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-2.1.4.jar:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-2.1.4.jar:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:137) ~[securejarhandler-2.1.4.jar:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] {}

 

Link to comment
Share on other sites

that is not how we do it in modern era. you probably found decade old instructions on mc forum...

if your dependency mod is on curseforge or modrinth, just pull it from there. go to curseforge page of your mod, if there is "legacy" prefix in address bar delete it. find the file, click the copy button. paste into dependencies section (where the jei example line is).

if it's not on curseforge/modrinth, use a flat dir dependency (see community wiki).

repositories {
    maven {
        url = "https://www.cursemaven.com"
    }
}

dependencies {
    minecraft '...'
    implementation fg.deobf("curse.maven:SOMETHING:SOMETHING")
}

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.