VOOZH about

URL: https://minecraft.wiki/w/Template:TradeLine

⇱ Template:TradeLine – Minecraft Wiki


Template:TradeLine

From Minecraft Wiki
Jump to navigation Jump to search
Documentation[view] [edit] [history] [purge]
This template uses Module:TradeTable, a script written in Lua.

This template can only be used as an argument to {{TradeTable}}

This template is designed to be used inline, as an unnamed parameter to {{TradeTable}}.

You can copy the blank examples below to easily fill in commonly used parameters:

|{{TradeLine|lvl=|slot=|want=|wantQuant=|give=|giveQuant=|multi=|maxTrades=|xpGain=}}
  • give/want default to Emerald
  • give/wantQuant defaults to 1


Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
levellevel lvl

The name of the villager level this trade is offered by

Suggested values
Novice Apprentice Journeyman Expert Master
Stringrequired
slotslot

The Bedrock Edition slot this trade is part of

Numberrequired
slotDrawsslotDraws

The amount of trades to be drawn for a Bedrock slot, overriding the default value (1). Set to 2 for villager trades that are not bound to a single specific slot (e.g. cartographer's journeyman trades, which can appear in slots 5-6).

Numberoptional
wantwant want1

The name of the item the villager wants in this trade

Default
Emerald
Example
Coal
Page nameoptional
wantQuantwantQuant wantQuant1

The quantity wanted by the villager in this trade

Default
1
Example
15
Numberoptional
want2want2

Second item wanted by the villager in this trade

Default
None
Example
Book
Page nameoptional
wantQuant2wantQuant2

The quantity of the second item wanted by the villager in this trade.

Default
None
Example
5
Numberoptional
wantNotewantNote

The reference name. To apply the same reference to more than one trade in a table, set wantNote to the same value in each trade, and set wantNoteText on ''one'' trade.

Example
librarian_enchant
Stringoptional
wantNoteTextwantNoteText

The text for the reference. Must only be set once per reference. Use wantNote to apply the same text to multiple trades in a table.

Stringoptional
multimulti

The price multiplier for the trade. Must be either 0.05, or 0.2

Suggested values
0.05 0.2
Numberrequired
givegive

The name of the item given by the villager in this trade

Default
Emerald
Page nameoptional
giveQuantgiveQuant

The quantity of item given by villager in this trade

Default
1
Example
5
Numberoptional
giveNotegiveNote

The reference name. To apply the same reference to more than one trade in a table, set wantNote to the same value in each trade, and set wantNoteText on ''one'' trade.

Stringoptional
giveNoteTextgiveNoteText

The text for the reference. Must only be set once per reference. Use wantNote to apply the same text to multiple trades in a table.

Stringoptional
maxTradesmaxTrades

The maximum number of trades that can be executed before the villager must restock

Example
12
Numberrequired
xpGainxpGain

The xp gained by the villager for each trade

Example
5
Numberrequired
weightweight

The number of villager trade choices this line represents. Currently only used by "All color" trades, where each trade is actually 16 distinct color trades represented as one.

Default
1
Numberoptional
overrideProbabilityoverrideProbability

Text to be displayed instead of the automatically calculated probability. Meant to be used for trades which have a varying probability depending on factors such as the villager's biome outfit.

Stringoptional
overrideProbabilityJEoverrideProbabilityJE

Text to be displayed instead of the automatically calculated Java Edition probability

Stringoptional
overrideProbabilityBEoverrideProbabilityBE

Text to be displayed instead of the automatically calculated Bedrock Edition probability

Stringoptional
[view] [edit] [history] [purge]The above documentation is transcluded from Template:TradeLine/doc.
Retrieved from "https://minecraft.wiki/w/Template:TradeLine?oldid=2612684"

Navigation menu