Posted April 10, 201411 yr I have my mod named "mod1", which adds things. I have my other mod named "mod2", which adds mobs how to make: if both mod set in game, the mobs of mod2 could drop items from mod1? I'm new in eclipse... I think: 1. in mod2 need check is set mod1. (How?) 2. get itemId of item from mod2. (How?) 3. drop item. How get itemId for drop if another mod Buildcraft or IC2 ?
April 10, 201411 yr I have my mod named "mod1", which adds things. I have my other mod named "mod2", which adds mobs how to make: if both mod set in game, the mobs of mod2 could drop items from mod1? I'm new in eclipse... I think: 1. in mod2 need check is set mod1. (How?) 2. get itemId of item from mod2. (How?) 3. drop item. How get itemId for drop if another mod Buildcraft or IC2 ? 1. Loader.isModLoaded(MODID) - where MODID is the mod-ID of the mod you search for, e.g. Loader.isModLoaded("RedPowerWorld") 2. GameRegistry.findItem(modId, name) - where modId is the above-mentioned one, and name is the registered name of the mod item (the second parameter in GameRegistry.registerItem) The second returns null if it can't find the item, so you could skip the first check if the mod is loaded. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
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.