Easy NPC

Easy NPC

2M Downloads

[Feature Request] Allow using item tags for trades

Martmists-GH opened this issue ยท 2 comments

commented

Is your feature request related to a problem? Please describe. ๐Ÿค”
It's simply not practical to add trades for every single log type, especially on a modded server with close to a hundred log types.

Describe the solution you'd like ๐Ÿ’ญ
Allow specifying a tag rather than item (either through "#minecraft:my_tag" or some kind of "type": "tag" entry)

Describe alternatives you've considered ๐Ÿ”„
As mentioined before, adding every single trade is just not doable.

Additional context ๐Ÿ“
Fabric 1.20.1

commented

Thanks for the feature request! Using item tags for trades sounds like a useful improvement, especially for modded servers with many item variations.

To better understand how you'd like this to work, could you provide some additional details?

  • NBT Storage: Should this be specified directly in the NBT data of the NPC trades, or do you envision another way to define it?
  • Tag Specification: How would you prefer to define item tags in trade configurations screen?
  • Trade Behavior: Should the trade accept any item within the specified tag, or would you like additional conditions (e.g., item durability, enchantments)?

This will help me assess how best to implement it. Looking forward to your input!

commented

I'd say storage should be fine to keep as is and have the specification simply be #tag with runtime checking the 1st character of the item would be the simplest implementation. As for NBT data, that's perhaps best suited for a different issue.