Merchant Recipe - Create (Expression) — SkBee
Addon: SkBee · Category: Expression · Since: 1.17.0
Syntax
[new] merchant recipe with result %itemtype% with max uses %number% [with uses %-number%] [(|with experience reward)] [with villager experience %-number%] [with price multiplier %-number%] [with demand %-number%] [with special price %-number%]Description
Create a merchant recipe.
NOTE: You will need to use the merchant recipe ingredients expression to add ingredients.
max uses = A trade has a maximum number of uses. A Villager may periodically replenish it's trades by resetting the uses of it's merchant recipes to 0, allowing them to be used again.
experience reward = A trade may or may not reward experience for being completed.
Demand & Special Price were added in MC 1.18.x:
demand = This value is periodically updated by the villager that owns this merchant recipe based on how often the recipe has been used since it has been last restocked in relation to its maximum uses. The amount by which the demand influences the amount of the first ingredient is scaled by the recipe's price multiplier, and can never be below zero.
special price = This value is dynamically updated whenever a player starts and stops trading with a villager that owns this merchant recipe. It is based on the player's individual reputation with the villager, and the player's currently active status effects (ex: hero of the village). The influence of the player's reputation on the special price is scaled by the recipe's price multiplier.
Examples
set {_m} to merchant recipe with result diamond sword with max uses 10