Started by
Toxxikz
on
Topic category: Help with MCreator software
I am have created a new block in my mod lets call it osmium_cane but i dont want this block to be available unless the mekanism mod is loaded, cant seem to figure out how to do this,
I know it can make the entire mod dependent upon mekanism being loaded, but other elements do not require it, i only want this one block to be removed if mekanism is not loaded.
Edited by Toxxikz on Sun, 07/05/2020 - 21:24
yes, this is possible, but you would need some coding knowledge.
First, lock the code of your item mod element(using the lock button on the sidebar) and go to its .java file. (using the pencil and lines button).
Then, find the method called "initElements". It should be around line 28. It would look something like this:
Then, replace the above code with this and run control+w to add all imports.
Essentially what this does is check if a mod is loaded, if so, register this item in the mod element list. This would prevent the mod element being loaded if the mod isn't detected, which will further prevent the item being registered if the mod isn't loaded.
Wow, thanks, I was really looking for this, but would you happen to know how to register an item on a tab in another mod's creative?
I don't really know, sorry :(