Minecraft:Villager trade definition
From SAS Gaming Wiki
More actions
Villager Minecraft:trades are stored as Minecraft:JSON files within a Minecraft:data pack in the path Template:Cd. Despite their name, they also control the trades of Minecraft:wandering traders.
JSON format
- Template:Nbt: The root object.
- Template:Nbt: The item needed for the trade (i.e. the price)
- Template:Nbt: The Minecraft:resource location of the item. Must not be Template:Cd
- Template:NbtTemplate:NbtTemplate:Nbt: Optional Minecraft:number provider (defaults to Template:Cd). Define the cost, number of items needed for the trade. The final cost can be altered by the additional cost (by Template:DCL and Template:NbtTemplate:Nbt). If the cost quantity is less than 1, the trade is removed. Final cost above Template:DCL are treated as Template:Cd.
- Template:Nbt: Optional map of additional (non-default) data components.
- Template:Nbt: Secondary item needed for the trade, optional. No altered by the additional cost.
- Same format as Template:Nbt
- Template:Nbt: The item given by the trade
- Template:Nbt: Optional list of modifiers to apply to the item given by the trade
- Template:Nbt: An inline Minecraft:item modifier. The Template:Cd modifier is not supported.
- Template:NbtTemplate:NbtTemplate:Nbt: Optional Minecraft:number provider (defaults to Template:Cd) determining the maximum amount of uses of this trade. Values below 1 are treated as 1.
- Template:NbtTemplate:NbtTemplate:Nbt: Optional Minecraft:number provider (defaults to Template:Cd) determining how much reputation (such as discounts and penalties) affect the count of Template:Nbt. Called 'price multiplier' in Template:Slink. Values below 0 are treated as 0.
- Template:NbtTemplate:NbtTemplate:Nbt: Optional Minecraft:number provider (defaults to Template:Cd) determining how much xp the merchant gets when the trade is done. Values below 0 are treated as 0.
- Template:NbtTemplate:Nbt: Optional Minecraft:predicate on the merchant that needs to pass for this trade to be offered. The Template:Cd predicate is not supported.
- Template:NbtTemplate:Nbt: Optional — Template:Json ref. If present in the item Template:Nbt's Template:DCL component after the execution of Template:Nbt, doubles the additional cost (defined by the Template:DCL component) of the item Template:Nbt.
- Template:Nbt: The item needed for the trade (i.e. the price)
History
Template:Navbox Java Edition technical
Minecraft:de:Handelsdefinition Minecraft:ja:取引のカスタマイズ Minecraft:pt:Definição de comércio do aldeão Minecraft:zh:村民交易定义格式