Hi everyone,
It would be great for datapack creators to be able to detect what item the player is selling to a villager. Combining this with the data driven villager trades in 26.1 snapshot 1 would make for a world of customization options, think detecting NBT value on sold items. Maybe something along the sort of adding a villager tag called "Trading" which is a boolean telling whether the villager is trading and a tag called "Receiving" which contains the usual item count and Id etc.
Just an example of what a pack maker could use this for: have the player decide what enchanted books a librarian can sell by "teaching" them. The new data driven trades are used to have librarians of certain levels ask for an enchanted book in exchange for some emeralds. Then, when the player sells them an enchanted book, that trade slot gets changed. The villager now sells a book with those enchantments to the player for a number of emeralds. No more rerolling with lecterns!
Thanks for your time
Please sign in to leave a comment.
0 Comments