Is.M.L Posted August 3, 2017 Share Posted August 3, 2017 I'm trying to make a mod to better integrate a few features from other mods. I don't want to make it "kind of right" and later find out it doesn't work properly, so I'm asking this topic so someone can answer with a complete description of what needs to be done to achieve this. Do I need to download the mods' deobfuscated jars to compile? Where do I put them? What do I need to change in the @Modannotation? What do I need to change in the mcmod.info file? What do I need to change in the build.gradle file? What's are the differences between a mod that requires another mod to be installed or just adds extra features if said other mod is installed? How do I detect if another mod is running in my code? Is there anything else I need to know? This is what my mod currently looks like:https://github.com/FourWingedKid/stoneyintegration Quote Link to comment Share on other sites More sharing options...
Draco18s Posted August 3, 2017 Share Posted August 3, 2017 3 hours ago, Is.M.L said: Do I need to download the mods' deobfuscated jars to compile? Where do I put them? Only if you want to either: a) test in the development environment b) using an exposed API 3 hours ago, Is.M.L said: What do I need to change in the @Modannotation? You need to add dependencies = "required-after:..." or dependencies = "after:..." depending on hard or soft dependencies ("after" just loads your mod later, "required-after" means that the other mod MUST be present or your mod can't load). 3 hours ago, Is.M.L said: What do I need to change in the mcmod.info file? Technically, nothing, but you should add a "dependencies": ["..."] for any hard dependencies 3 hours ago, Is.M.L said: What do I need to change in the build.gradle file? If your not using an exposed API, nothing. Otherwise find and follow the directions in the dependencies block. 3 hours ago, Is.M.L said: What's are the differences between a mod that requires another mod to be installed or just adds extra features if said other mod is installed? The former uses if(Loader.isModLoaded(...)) to control logic (e.g. recipes) of itself. The latter uses API calls. For example: this. 3 hours ago, Is.M.L said: How do I detect if another mod is running in my code? See above 3 hours ago, Is.M.L said: Is there anything else I need to know? The @Optional annotation can allow you to move a hard-dependency to a soft-dependency. The only example I have is from 1.7.10 and I think the package changed. 1 Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Is.M.L Posted August 3, 2017 Author Share Posted August 3, 2017 (edited) Thank you very much! An exemplar reply. Just one doubt: 9 minutes ago, Draco18s said: Technically, nothing, but you should add a "dependencies": ["..."] for any hard dependencies Is the format of this dependencies field in mcmod.info the same as it is in the @Mod annotation? (i.e. either required-after:[modid] or after:[modid]) Edited August 3, 2017 by Is.M.L Quote Link to comment Share on other sites More sharing options...
Draco18s Posted August 3, 2017 Share Posted August 3, 2017 (edited) Yes, both use the modid where I put the ellipses and would be equivalent to required-after. The mcmod.info file is not actually used by Forge for the most part, but is supposed to contain the same info as the @mod header so that websites like Curse can read the information. Edited August 3, 2017 by Draco18s Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Is.M.L Posted August 3, 2017 Author Share Posted August 3, 2017 And the require-after, and after attributes too? Quote Link to comment Share on other sites More sharing options...
Draco18s Posted August 3, 2017 Share Posted August 3, 2017 7 minutes ago, Is.M.L said: And the require-after, and after attributes too? Those ones are used by Forge to determine the load order. Not putting that may lead to your mod loading before your dependency, which would be bad. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Is.M.L Posted August 3, 2017 Author Share Posted August 3, 2017 Thank you! Quote Link to comment Share on other sites More sharing options...
loordgek Posted August 3, 2017 Share Posted August 3, 2017 1 hour ago, Draco18s said: The @Optional annotation can allow you to move a hard-dependency to a soft-dependency. The only example I have is from 1.7.10 and I think the package changed. note https://github.com/MinecraftForge/MinecraftForge/pull/4174#issuecomment-314991496 Quote Link to comment Share on other sites More sharing options...
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.