1. Use the relevant mod (compared with the second and third methods, this method is recommended because it is simple).
There are many MODS that can do this. Please refer to the usage of relevant mod for details (I have never used it, so I won't introduce it here, sorry).
Use nbtedit mod
Enter /nbtedit to the villagers you need to change, find discounts and recipes, each of which is a transaction, among which
MaxUses: the maximum number of transactions.
Purpose (as it seems to be called): the number of transactions.
Buy: buy something.
BuyB: The second thing to buy.
Sell: Something sold to a player.
Among them, buy, buy, sell,
Id is the project id (ID name is above id( 1.7)).
Count is quantity,
Damage is the damage value of an item.
Make corresponding changes and save.
3. Don't use nbtedit to change nbt (unless this method is not used in extreme cases, which is extremely complicated and has a high error rate, which may damage the archive).
First, the villagers who need to be changed are named to distinguish them.
Exit the game
Use nbtexplorer to open the corresponding zone file (what is a zone file? For the files in the area folders in the archive directory, each area file has a certain number of blocks. How to calculate the regional file where the block is located, please refer to wiki/ regional file format), find the corresponding block, and find the village entity with the corresponding name.
Refer to item 2 to find offers and recipes to change.