Jump to content

[1.7.10] Problem with custom recipe (not all the time)


McJty

Recommended Posts

I have had some reports of a custom recipe in my mod not working properly. I cannot reproduce it but I've seen others who can. It is a custom recipe which I created because I needed a recipe that matches only with an efficiency 3 enchanted diamond pickaxe. So I need the recipe to match on specific NBT data. Here is my custom recipe:

 

https://github.com/McJty/RFTools/blob/master/src/main/java/com/mcjty/rftools/crafting/NBTMatchingRecipe.java

 

and here is where I use it:

 

https://github.com/McJty/RFTools/blob/master/src/main/java/com/mcjty/rftools/crafting/ModCrafting.java

 

As it works for me it is a bit hard to debug. Can someone spot a mistake that I may have made here? Maybe there is some kind of mod interaction going on and in that case I'd like to make my recipe more robust.

 

Thanks!

Link to comment
Share on other sites

There is no crash. It is just not crafting. The recipe simply doesn't work.

 

Anyway, I suspect I know what the problem is. It is possible that my NBT matching algorithm is too specific. It appears that an enchanted pickaxe made with 'x' key works fine while an echanted pickaxe made with an enchnated book and anvil doesn't. So I probably have to change my matching algorithm to only match the NBT keys that I want.

Link to comment
Share on other sites

You should check only if the enchant tag is same, for Item's NBT can contain various information.

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.

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.