EnchantedItemForEmeralds

Link to enchanteditemforemeralds

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

Interfacce Implementate

Link to interfacce-implementate

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

ZenScript
Copy
new EnchantedItemForEmeralds(item as ItemDefinition, baseEmeraldCost as int, maxUses as int, villagerXp as int) as EnchantedItemForEmeralds
new EnchantedItemForEmeralds(<item:minecraft:diamond_axe>, 5, 8, 2);
ParametroTipoDescrizione
Parametro
item
Tipo
ItemDefinition
Descrizione
The Item that is being sold by the villager
Parametro
baseEmeraldCost
Tipo
int
Descrizione
The base cost of the trade before any multipliers are applied
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 EnchantedItemForEmeralds(item as ItemDefinition, baseEmeraldCost as int, maxUses as int, villagerXp as int, priceMultiplier as float) as EnchantedItemForEmeralds
new EnchantedItemForEmeralds(<item:minecraft:diamond_axe>, 5, 8, 2, 0.05);
ParametroTipoDescrizione
Parametro
item
Tipo
ItemDefinition
Descrizione
The Item that is being sold by the villager
Parametro
baseEmeraldCost
Tipo
int
Descrizione
The base cost of the trade before any multipliers are applied
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