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.EmeraldForItems;

Interfacce Implementate

Link to interfacce-implementate

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

ZenScript
Copy
new EmeraldForItems(item as ItemLike, cost as int, maxUses as int, villagerXp as int) as EmeraldForItems
new EmeraldForItems(<item:minecraft:diamond>, 1, 8, 2);
ParametroTipoDescrizione
Parametro
item
Tipo
ItemLike
Descrizione
The Item that is being given to the villager
Parametro
cost
Tipo
int
Descrizione
How many emeralds does this trade cost
Parametro
maxUses
Tipo
int
Descrizione
How many times can this trade be used
Parametro
villagerXp
Tipo
int
Descrizione
How much experience does this trade reward the villager