CraftTweaker

CraftTweaker

151M Downloads

Smithing Table Recipes Don't Work Properly (Again)

RobertHDPotatoes opened this issue ยท 2 comments

commented

Intro:

I believe this is the same issue that I reported and WAS fixed, (The original bug report can be found here: #1240 (comment) ) but it seems to have come back and I'm not sure when or what update of CraftTweaker broke it again, unfortunately. I do not know if it's possible for me to re-open the original issue, hence this new one. Sorry if there was a better way to report this.

Issue Description:

Basic smithing table recipes do not function as they do in vanilla. If one of the input items in any smithing table recipe has any specific tags on it (damage values, enchantments, renamed, etc.) it is not accepted as a valid input item.

What happens:

If you make a new smithing table recipe to make an iron helmet out of a chainmail helmet and an iron ingot, the chainmail helmet cannot be used in the recipe if it has been damaged, renamed, enchanted, or any other change occurs with the chainmail helmet.

What you expected to happen:

I expected that a damaged and enchanted chainmail helmet will still be accepted by the smithing table recipe, as that is how diamond armor functions in vanilla to get Netherite. If you enchant a diamond helmet, and it only has 30 durability left, then put it in a smithing table with a Netherite ingot, you will get a Netherite helmet with the same enchants and comparable durability back out.

Script used:

https://pastebin.com/dRg4ruJz

crafttweaker.log file:

https://pastebin.com/H286UAE3


Environment:

  • Minecraft Version: 1.16.5
  • Forge Version: 36.1.31
  • CraftTweaker Version: CraftTweaker-1.16.5-7.1.0.314
  • Are you using a server: No
  • If yes, does the client have the exact same scripts?

Game log:

https://pastebin.com/T6tYyJmy

commented

I probably should have been a bit clearer in the last issue, by default we do not match damaged items, we do exact damage matching, so if you want your IIngredient to support a full helmet, and a damaged helmet, you need to do:

smithing.addRecipe("iron_helmet", <item:minecraft:iron_helmet>, <item:minecraft:chainmail_helmet>.anyDamage(), <tag:items:forge:ingots/iron>);

that anyDamage() is required.

As for the other issues, after adding anyDamage(), I am unable to reproduce.
In the gif below I tested with:

  1. Fully healed
  2. Damaged
  3. Renamed
  4. Renamed + Damaged
  5. Fully healed enchanted
  6. Damaged enchanted
  7. Renamed enchanted
  8. Renamed + Damaged enchanted

and all work as expected.

https://i.blamejared.com/1301.gif

commented

Thanks, everything is working as intended with .anyDamage() now. I could've sworn that my scripts were working without that for a while but maybe not