Jump to content

[1.6.4] Using other mod's item in your mod


Recommended Posts

What would I want to know, is will it be possible for me to use other mod's item in my mod.

E.g. I create a block, after I break it I got a HaloCraft's Gun( a mod's gun item)

If it is possible, how could I do it?

please help, guys :D

Link to comment
Share on other sites

You might need to use dependencies.


Check if the mod is installed correctly and working - [Loader.isModLoaded(modId)]

Don't remember the method for it, but gets the loaded items of a mod.


Use that. Hope that diesieben comes along and helps you out. c:

Link to comment
Share on other sites

Like coolboy, I'm not exactly sure, but I can help you search. You need to add the mod to your workspace somehow so you can reference the item via the mod's code. Also you need to add the original mod to the dependency list or add a default item that the block will drop in case the mod isn't loaded. Coolboy was also right about the method to use to see if the mod is loaded.


Add this to your @Mod annotation

dependencies = "required-after:halogunmod"


And this will be in your PreInit

halomodLoaded = true;


Then you can use that boolean in the block's class to determine what the block drops. However, there's always a better way to do things that I normally do, so search the web and I hope you find what you need.


**Since i'm unsure of the mod's ID, I just used halogunmod :)

Link to comment
Share on other sites

You can also make a crossover mod for your mod and the another mod.

you can have several mods in your mod.jar, so you can pack them in a jar.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.