BasicItemListing

Link to basicitemlisting

Importare la Classe

Link to importare-la-classe

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.villager.trade.type.BasicItemListing;

Interfacce Implementate

Link to interfacce-implementate

BasicItemListing implements the following interfaces. That means all methods defined in these interfaces are also available in BasicItemListing

ZenScript
Copy
new BasicItemListing(price as ItemStack, price2 as ItemStack, forSale as ItemStack, maxTrades as int, xp as int, priceMult as float) as BasicItemListing
new BasicItemListing(<item:minecraft:diamond>, <item:minecraft:diamond>, <item:minecraft:diamond>, 8, 2, 0.05);
ParametroTipoDescrizione
Parametro
price
Tipo
ItemStack
Descrizione
The primary Item that is being given to the villager
Parametro
price2
Tipo
ItemStack
Descrizione
The secondary item that is being given to the villager
Parametro
forSale
Tipo
ItemStack
Descrizione
The Item that is being sold by the villager
Parametro
maxTrades
Tipo
int
Descrizione
How many times can this trade be used
Parametro
xp
Tipo
int
Descrizione
How much experience does this trade reward the villager
Parametro
priceMult
Tipo
float
Descrizione
How much the price is affected by demand, Hero of the Village, and village reputation