Jump to content

Custom IRecipe Class


Asweez

Recommended Posts

I have an item with two NBT tags. I want Minecraft to look at what is in the crafting table and tweak the NBT tags based on that in the output. Someone suggested and IRecipe class. How would I do this or is there a tutorial?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Link to comment
Share on other sites

And then how would I a) detect if the items in the crafting table are the ones I want and b) How would I tweak the NBT of that item based on the other items in the crafting table?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Link to comment
Share on other sites

Override getCraftingResult. That gives you all the items in the crafting grid and you return the stack that those items will craft.

 

Example:

@Override
public ItemStack getCraftingResult(InventoryCrafting var1) {
ItemStack result = super.getCraftingResult(var1); // The itemstackthat this recipe creates

       // Add your nbt data to the itemstack

return result; // Return the itemstack
}

I am the author of Draconic Evolution

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.