Posted April 5, 20223 yr I'm trying to import classes from this mod library in my project: https://www.curseforge.com/minecraft/mc-mods/ftb-library-forge I've downloaded the .jar for 1.18.2, placed it in my project root folder and added it in IntelliJ as a module (by going to file -> project structure -> main -> +JARs or directories -> ftb-library-forge-1802.3.6-build.115.jar) I can import the classes in my code without error and have working autocomplete and inspection: Except whenever I try to build I get: error: package dev.ftb.mods.ftblibrary.ui does not exist import dev.ftb.mods.ftblibrary.ui.BaseScreen; I've also tried adding it to my classpath (I am on Windows) as suggested by some stackoverflow posts, using: javac -cp .;./ftb-library-forge-1802.3.6-build.115.jar dev/ftb/mods/ftblibrary/FTBLibrary.java except this just gives me: error: no source files Is there something wrong with what I'm doing here and/or is there an alternate way to get this dependency into my project?
April 6, 20223 yr Author I followed these links but am getting this note on my build.gradle, and the imports are still not found (though strangely, it still lets me run and doesn't error until I try to use the dependency's classes, at which point it throws a NoClassDefFoundError.
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.