Posted January 17, 201411 yr A player suggested me to create crafting recipes in my mod with blocks from other mods, but is it possible? I think that it can't be done because when I register the crafting recipes the Registry has to have the blocks registered.
January 17, 201411 yr You can use the API of a mod if it has one, but else, you can't (i think) Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
January 17, 201411 yr It would also make your mod dependent on the other mod. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
January 17, 201411 yr Author It would also make your mod dependent on the other mod. The way I was imagining it would create the recipes dynamically according with the number of mods. In this case, I've a basic block with a custom model and its texture depends of the block that you use to craft it. What he suggested was a recipe that you could do with a any block, including blocks from mods. But I'm not worried about this, thanks anw
January 17, 201411 yr You can do a soft dependency, its just a lot trickier to get working properly. And the other mods need to have an exposed API that you can use in your development environment. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
January 18, 201411 yr Hi If the other mods are properly written, they should register their Blocks & Items in the preinit phase, and you should register your recipes in the load phase, so you are guaranteed that the other mod will have registered its Blocks & Items by the time your recipe is registered. For more info see here http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html I'm not 100% sure how best to find the blocks registered by the other mod. I suspect GameRegistry.findBlock will do it for you, but I've never tried it so I'm not certain. (see http://greyminecraftcoder.blogspot.com.au/2013/12/forge-blocks.html) -TGG
January 18, 201411 yr In the particular aspect of recipes, the OreDictionary is here for such a thing. Provided other mod blocks are registered in this dictionary, you can add recipes for them.
January 18, 201411 yr could you make a separate download for an add-on that uses the other mod's block id's and etc.?
January 18, 201411 yr could you make a separate download for an add-on that uses the other mod's block id's and etc.? You can. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
January 22, 201411 yr If the other mods are properly written, they should register their Blocks & Items in the preinit phase Apparently this is debatable. I've moved my stuff between preinit and init 3 or 4 times in the early days because people kept telling me one or the other was the "right" way to do it. A standardized option would be nice, but I think lex & the team themselves would have to say which is truly better. (It's worth noting though I do agree with you; I find having blocks in PreInit and recipes in Init just avoids messy little errors from having things in the wrong order. Just stating as I know it's debated a bit) http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
January 22, 201411 yr It also allows other mods to do things with your blocks. Register them early! Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.