Started by
Ro...
on
Topic category: Help with Minecraft modding (Java Edition)
Hey, Let say i have a mod (mod 1) which add Player Statistics (Magic Strength, Mana, Mana Speed (They are numbers abviously)), i have weapons using these Stats. then, i make another mod (mod 2) which add more weapons to my mod 1, I want the weapons of mod 2 to use the stats of mod 1, Is this possible to do that?
You might have to do java code to change the used element manually to one from your "mod 1." You could try and combine this with nbt data and your mod 2 will get data from your item from mod 1.
NBT Tags are shared by mods, so you can use NBTs across any of your mods (or the ones added by other people). This way I added add-on support in my mod.
Variables, in the other hand, would require Java ig. But if you don't need to access someone else's mods' variables, you can easily do workaround - make procedure pushing variable to NBTs, and then you can access it via procedures in another mod.
I hope that explains enough, in case you have questions, feel free to ask ^^
Thank you, you gived me an idea. it might take time, and i might hurt my brain because of how complicated it will be, but its possible.
By the way, don't forget to add a mod dependency for your mod B if it's going to use things from mod A much. You don't have to do this if you're just making a simple "hey these mods can work together" feature, but you do if it's like an add-on.