ItemsForEmeralds

Link to itemsforemeralds

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

Interfacce Implementate

Link to interfacce-implementate

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

ZenScript
Copy
new ItemsForEmeralds(item as ItemDefinition, emeraldCost as int, numberOfItems as int, villagerXp as int) as ItemsForEmeralds
new ItemsForEmeralds(<item:minecraft:diamond>, 2, 4, 2);
ParametroTipoDescrizione
Parametro
item
Tipo
ItemDefinition
Descrizione
The Item that is being sold by the villager
Parametro
emeraldCost
Tipo
int
Descrizione
How many emeralds will be given to the villager
Parametro
numberOfItems
Tipo
int
Descrizione
The amount of the Item being sold to the villager
Parametro
villagerXp
Tipo
int
Descrizione
How much experience does this trade reward the villager
ZenScript
Copy
new ItemsForEmeralds(block as Block, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int) as ItemsForEmeralds
new ItemsForEmeralds(<block:minecraft:dirt>, 2, 4, 8, 2);
ParametroTipoDescrizione
Parametro
block
Tipo
Block
Descrizione
The Block that is being sold by the villager
Parametro
emeraldCost
Tipo
int
Descrizione
How many emeralds will be given to the villager
Parametro
numberOfItems
Tipo
int
Descrizione
The amount of the Block being sold to 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 ItemsForEmeralds(itemStack as ItemStack, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int, priceMultiplier as float) as ItemsForEmeralds
new ItemsForEmeralds(<item:minecraft:diamond>, 2, 4, 8, 2, 0.05);
ParametroTipoDescrizione
Parametro
itemStack
Tipo
ItemStack
Descrizione
The Item that is being sold by the villager
Parametro
emeraldCost
Tipo
int
Descrizione
How many emeralds will be given to the villager
Parametro
numberOfItems
Tipo
int
Descrizione
The amount of the Item being sold to 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
Parametro
priceMultiplier
Tipo
float
Descrizione
How much the price is affected by demand, Hero of the Village, and village reputation