ItemsAndEmeraldsToItems

Link to itemsandemeraldstoitems

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

Interfacce Implementate

Link to interfacce-implementate

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

ZenScript
Copy
new ItemsAndEmeraldsToItems(fromItem as ItemLike, fromCount as int, toItem as ItemDefinition, toCount as int, maxUses as int, villagerXp as int) as ItemsAndEmeraldsToItems
new ItemsAndEmeraldsToItems(<item:minecraft:dirt>, 4, <item:minecraft:diamond>, 1, 8, 2);
ParametroTipoDescrizione
Parametro
fromItem
Tipo
ItemLike
Descrizione
The secondary item that is being given to the villager
Parametro
fromCount
Tipo
int
Descrizione
The amount of the secondary item that is being given to the villager
Parametro
toItem
Tipo
ItemDefinition
Descrizione
The Item that is being sold by the villager
Parametro
toCount
Tipo
int
Descrizione
The amount of the item that is being sold by the villager
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
ZenScript
Copy
new ItemsAndEmeraldsToItems(fromItem as ItemLike, fromCount as int, emeraldCost as int, toItem as ItemDefinition, toCount as int, maxUses as int, villagerXp as int) as ItemsAndEmeraldsToItems
new ItemsAndEmeraldsToItems(<item:minecraft:dirt>, 4, 2, <item:minecraft:diamond>, 1, 8, 2);
ParametroTipoDescrizione
Parametro
fromItem
Tipo
ItemLike
Descrizione
The secondary item that is being given to the villager
Parametro
fromCount
Tipo
int
Descrizione
The amount of the secondary item that is being given to the villager
Parametro
emeraldCost
Tipo
int
Descrizione
How many emeralds will be given to the villager
Parametro
toItem
Tipo
ItemDefinition
Descrizione
The Item that is being sold by the villager
Parametro
toCount
Tipo
int
Descrizione
The amount of the item that is being sold by the villager
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