Before the update for MC 1.20.5, merchant recipes would accept items with additional NBT tags (i.e. ignore any additional NBT tags that are not present on the item used inside the recipe).
Since the update for MC 1.20.5, MerchantRecipes created via the Bukkit API now also check for the absence of components.
Example: Creating a merchant recipe with an item without enchantments would also accept enchanted items pre 1.20.5. Now, enchanted items are no longer accepted.
This ticket asks to revert this behavior.
Ticket https://hub.spigotmc.org/jira/browse/SPIGOT-7828 asks for the addition of new API to have more control over how items are matched, both in merchant recipes and outside. One idea there is to use ItemMeta to represent the DataComponentPredicate data + revert how we convert ItemMeta to merchant recipes (i.e. this ticket). But to properly support the fine control over how ItemMeta properties are matched (unset vs empty), further API changes might be required to ItemMeta (see the notes in the other ticket). Hence, this separate ticket asks to at least restore the pre 1.20.5 behavior of how items are converted to merchant recipes for now.
- relates to
-
SPIGOT-7828 MC 1.20.5+: Item component predicate API + use for Merchant trades
- Open