Started by
Nelson TheAwesome
on
Topic category: Help with Minecraft modding (Java Edition)
Hi, I was wondering if I could make tools/items in my mod that would only work if another mod is installed, for example a mod that adds emerald tools or such and my mod that adds tool variant with different variants of every tool with different handles based on the type of wood used to craft the sticks. I'd like to make it so I could make emerald tools that have all the different variants, but they only show up in game if you have that other mod installed. If you didn't have it installed you wouldn't be able to craft them (even though the crafting recipe uses vanilla emeralds) and you wouldn't be able to see them in the creative inventory.
Your mod shouldn't even load in if you have made it dependent on another mod. I am not sure if you are able to do this in MCreator though.
Oh my that was the 3000 post on this forum...
as I always tell people on these forums, a lot of things are not possible without programming.
Here goes the nerdy explanation:
You would either need the deobf version or if the mod files are hosted on maven stuff, the maven data for the build.gradle. Usually on their mods' Github readme page.
if you have the deobf version just drop it to your mod workspace's root folder (not the src folder) and add this line to the bottom "dependencies" part of build.gradle (NOT the one in buildscript!):
replace "Kiwi-1.15.2-2.7.0-deobf.jar" with the full file name of the deobf version of the mod file, including the file extension
so your build.gradle would look something like this:
again, don't attempt this unless you have at least of a basic understanding of Java.
@CrispyChip I thought you said to tell them it is not possible with MCreator?
ahem.
it is not possible with MCreator without java.
Giving code is not a good practice. Read more here https://www.javaprogrammingforums.com/cafe/9544-problem-spoon-feeding.html
I'm not giving code.
I said don't do this unless you understand java and I explained what the code does and how to do it.
please don't argue with people everywhere you go.
fine this is not respectful of me, guess I'll just have to ignore you
I explained what the method did.
I don't argue with people, I have formed a lot of positive relations on this forum. I argue with you, only because you got all pissy pants about 3 lines of code, and you would of rather me just done nothing lol.
Code provided was not usable snippet so it was not really code spooning, at least I think so ;)
It is normal that if one wants to use APIs, code will be needed. There is no way on earth I could integrate support for all APIs in MCreator XD
Lastly, keep this friendly guys, no need to argue ;)
yah thanks for coming here to keep the peace, the discussion is getting a bit heated lol :D
It was more about showing the absurdity in another post. But yes, I am sorry CrispChip for not keeping the peace.
I decided just to create a separate mod file that is just an addon for my mod that makes it compatible with the other mod xD though seems putting the other mod’s mod id in the required mods list doesn’t actually stop you from using it. I expected it to not let you play with the addon mod unless you have the mod it’s supposed to be working with.
also side note I figured out if I make an item in mcreator, lock it, then replace the item name in @ObjectHolder(“item name”) with the item from the other mod I basically make like a reference item that I can use in crafting recipe’s and stuff and in game it’ll use the item from the other mod which is pretty nice
How did you do this i cant find where the object handler is for the item