Posted April 16, 20169 yr For my Resource Dumper mod I'm working on, I loop through the Item Registry then loop through each sub-type given by the getSubItems method and save each ItemStack in an ArrayList assigning it a random UUID. Then as I go through each recipe I look for the ingredient and the aforementioned arraylist to get the UUID. All of this info is stored in JSON files, the items (dubbed resources) in its own file and the recipes in its own file with the ingredients referencing items in the resources file. Now for the most part this system works perfectly. However my mod is not able to find information about certain blocks like slime blocks, hay bales, blocks of coal; redstone; lapis; emerald, etc. I suspected this to be because when a Block is given to an ItemStack, the block is wrapped in an ItemBlock instance and this would cause ItemStack.isItemEqual to give a false negative. I ruled this out because my resource dumper is able to equate Quartz Slabs and Chiseled Quartz Slabs when using the former to make the later in a recipe. This leads me to believe the cause is a metadata/nbt quirk which leads me to my question: Where does Minecraft (and Forge I suppose) create the recipes for all its blocks and items so that I could rule that out as a possibility? I like trains.
April 17, 20169 yr Minecraft creates its recipes in the CraftingManager constructor, Forge replaces some of these with ore recipes in OreDictionary.initVanillaEntries . Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.