Grindstone adds RepairCost: 0
The bug
When using a grindstone it always sets RepairCost:0 in the NBT of the item (except for books, see MC-148476), even though that is redundant because 0 is the default if no value is present.
Due to MC-129057, this prevents the recipe book from using such items (e.g. bow for dispenser recipe or fishing rod for carrot / fungus on a stick) because it does not ignore RepairCost:0 and therefore considers it custom NBT data, which should prevent using the item for recipes.
Reproduction steps
- Put a bow in your mainhand and enchant it
/enchant @s minecraft:unbreaking
- Put the bow in a grindstone and remove its enchantments
- Try using the bow as part of the dispenser recipe by clicking on it in the recipe book
It refuses to use the bow - Inspect the NBT data of the bow by putting it in your mainhand and running
/data get entity @s SelectedItem
The NBT data of the bow contains RepairCost:0
2020-04-27, 07:56 PM
2023-08-16, 05:45 PM
2023-08-16, 05:45 PM
9
6