How to go about making a mod addon?

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Matthew Rivas

New Member
Jul 29, 2019
24
0
0
Say if I wanted to make an add-on for a mod, like Tinker's Construct or something. How along the lines would I go about doing this. I'm new modding still. But I wanted a basic idea. Some info would be greatly appreciated! :)
 
C

chbachman

Guest
Say if I wanted to make an add-on for a mod, like Tinker's Construct or something. How along the lines would I go about doing this. I'm new modding still. But I wanted a basic idea. Some info would be greatly appreciated! :)
It honestly would depend greatly on the mod. In your example for Tinker's Construct, you would need to add it as a dependency in your build.gradle file, then use the API/Mod to develop with.
 

Matthew Rivas

New Member
Jul 29, 2019
24
0
0
It honestly would depend greatly on the mod. In your example for Tinker's Construct, you would need to add it as a dependency in your build.gradle file, then use the API/Mod to develop with.

Yes I was reading that on the Forge Wiki site. It said I would need to decompile a mod first and add it as the dependency/parent. I understood how to add the code, but not decompile it.
 
C

chbachman

Guest
:/ I'm sorry I'm not a expert modder, or a good one at least. I don't understand what to do with that. I've not come across "build.gradle"
Have you been able to launch a mod? If you have managed to get a mod working in Minecraft, then when you set up forge, it set up a file in your mod called build.gradle. I would go to #ForgeGradle on irc.esper.net (on IRC. Look that up if you don't know what it is.) They can help you set up your build.gradle to automatically download and decompile Tinker's Contstruct.
 
  • Like
Reactions: Pyure

Matthew Rivas

New Member
Jul 29, 2019
24
0
0
Have you been able to launch a mod? If you have managed to get a mod working in Minecraft, then when you set up forge, it set up a file in your mod called build.gradle. I would go to #ForgeGradle on irc.esper.net (on IRC. Look that up if you don't know what it is.) They can help you set up your build.gradle to automatically download and decompile Tinker's Contstruct.

Yes I did launch a small test mod. I managed to find the build.gradle. I will check out that IRC.
 

SpitefulFox

New Member
Jul 29, 2019
1,235
0
0
I wouldn't recommend making an add-on if you're completely new to modding. Should try and make sure you know how to get a mod working at all before you start trying to tinker with other people's mods.
 

Darkhax

New Member
Jul 29, 2019
34
0
0
I would highly suggest looking into Inter Mod Communication (IMC) and the Optional annotations. IMC allows mods to send messages back and forth using a key, and can pass several types of data such as String and NBTTagCompound. Many mods such as Waila and Tinkers Construct use an IMC based API to a degree. I wrote a basic tutorial on IMC a while ago on my site, you can find that here. The Optional annotation can be used on methods, classes or a specific Interface. The purpose of this annotation is to virtually remove a piece of your code, if a mod which that code depends on is not installed. Minalien wrote a blog entry covering this, which you can find here. The biggest piece of advice to anyone making an addon, or writing code which relies on another mod, is that you should never bundle that mod's api. It is completely unnecessary and will eventually lead to issues or other conflicts.
 
  • Like
Reactions: SatanicSanta