Jump to content

Recommended Posts

Posted

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.

Posted

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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