Posted December 27, 20186 yr I want to make my mod use a login mod's API if the mod was exist. What should I do to know whether the class/package of the API mod had been loaded? (And my Mod need works without the API Mod loading, with only a small amount of code enabled) Edited December 27, 20186 yr by themaw
December 27, 20186 yr Reflection. how exactly depends on the API and what you’re using it for About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
December 27, 20186 yr Author 1 hour ago, Cadiboo said: Reflection. how exactly depends on the API and what you’re using it for I'll try it. If I want to import lib to my mod,what should I do to prevent the error which appeared when the 'gradle build' run?
December 27, 20186 yr Author 1 hour ago, Corey said: Loader.isModLoaded("modname"); This is helpful.But I need more imformation. Edited December 27, 20186 yr by themaw
December 27, 20186 yr 2 hours ago, themaw said: the error which appeared when the 'gradle build' run You haven't shown us any errors
December 28, 20186 yr Author 10 hours ago, Corey said: You haven't shown us any errors It's my fault. Now I had fix this by edit the build.gradle I forget to edit the depencies dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" compile files('libs/Ecomoylite.jar') compile files('libs/FlexibleLogin.jar') compile files('libs/SpongeApi.jar') // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, // except that these dependencies get remapped to your current MCP mappings //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } (Yeah,they are sponge and plugin,but now I can import them as mod,and with out build error)
December 28, 20186 yr compile files('libs/ this is done automatically for you, thats why the /libs/ folder exists About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
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.