Shopkeepers

Shopkeepers

2M Downloads

NBT tag check

Marcy15 opened this issue ยท 1 comments

commented

Preliminaries:

  • Shopkeepers version: 2.15.1`
  • Spigot version: `git-Purpur-1628 (MC: 1.18.2)<

Some of my shopkeepers do not check the item's NBT tag. I link a video how to do the bug.
https://youtu.be/tNUwQok-UD0

Plus video: https://youtu.be/bxQrM7zv-Vk

commented

This is vanilla behavior and therefore intended behavior. Basically, the villager trading (and therefore also the shopkeeper trading) allows the provided item(s) to contain additional NBT data compared to the required item(s). So if the trade requires an item without a custom display name, players can use any item of matching type, with or without display name. But if the trade requires an item with a display name, the trade will only be allowed when the provided item has the exact same display name.

This behavior actually has some nice uses, because there are cases in which you may want trades to ignore certain NBT tags.

There is a config setting (use-strict-item-comparison) to make the item comparison more strict. However, since with this setting enabled the behavior no longer matches the vanilla trading behavior, enabling this setting will result in some glichtes. For instance, the result item will still show up inside the trading view, even though the player will not be able to pick it up.