squidlex Posted February 21, 2021 Posted February 21, 2021 Hi! My mod has integration for a bunch of other mods that I don't want to run in my testing environment, however I need the import to ensure I can actually build my project. Is there a way I can only import them at runtime? Quote
squidlex Posted February 21, 2021 Author Posted February 21, 2021 (edited) On 2/21/2021 at 8:51 PM, diesieben07 said: You should be able to use a compileOnly dependency. Expand Thank you and I thought as much, however when I do this the mod is still present at runtime. repositories { maven { name = "CurseForge" url = "https://minecraft.curseforge.com/api/maven/" } } dependencies { minecraft 'net.minecraftforge:forge:1.16.5-36.0.42' compileOnly "tough-as-nails:ToughAsNails-1.16.5:4.0.1.14:universal" } This wouldn't matter, however I'm experiencing an issue where my workspace is refusing to import access transformers from other mods, so when tough as nails is run as a dependency I get a crash. Edited February 21, 2021 by squidlex Quote
squidlex Posted February 21, 2021 Author Posted February 21, 2021 On 2/21/2021 at 9:05 PM, diesieben07 said: I can't reproduce this. I added the dependency using compileOnly like you did (except I correctly used fg.deobf). When starting the game i do not get ToughAsNails loaded, but I can reference it in the code. Expand Okay well sorry for taking up your time as the issue is on my end. Thank you! Quote
squidlex Posted February 21, 2021 Author Posted February 21, 2021 On 2/21/2021 at 9:05 PM, diesieben07 said: I can't reproduce this. I added the dependency using compileOnly like you did (except I correctly used fg.deobf). When starting the game i do not get ToughAsNails loaded, but I can reference it in the code. Expand Sorry to be a hassle, but what command line instructions do you use? I'm using gradlew genEclipseRuns gradlew eclipse Quote
squidlex Posted February 21, 2021 Author Posted February 21, 2021 On 2/21/2021 at 9:31 PM, diesieben07 said: I don't use Eclipse. I used gradlew genIntellijRuns and then used the runClient configuration in the IDE. Expand Okay thank you very much Quote
Recommended Posts
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.