EnchantedItemForEmeralds
Link to enchanteditemforemeralds
Importing the class
Link to importing-the-class
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 Copyimport crafttweaker.api.villager.trade.type.EnchantedItemForEmeralds;
Implemented Interfaces
Link to implemented-interfaces
EnchantedItemForEmeralds implements the following interfaces. That means all methods defined in these interfaces are also available in EnchantedItemForEmeralds
Constructors
Link to constructors
ZenScript Copynew EnchantedItemForEmeralds(item as ItemDefinition, baseEmeraldCost as int, maxUses as int, villagerXp as int) as EnchantedItemForEmeralds
new EnchantedItemForEmeralds(<item:minecraft:diamond_axe>, 5, 8, 2);
Parameter | Type | Description |
---|---|---|
Parameter item | Type ItemDefinition | Description The Item that is being sold by the villager |
Parameter baseEmeraldCost | Type int | Description The base cost of the trade before any multipliers are applied |
Parameter maxUses | Type int | Description How many times can this trade be used |
Parameter villagerXp | Type int | Description How much experience does this trade reward the villager |
ZenScript Copynew 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);
Parameter | Type | Description |
---|---|---|
Parameter item | Type ItemDefinition | Description The Item that is being sold by the villager |
Parameter baseEmeraldCost | Type int | Description The base cost of the trade before any multipliers are applied |
Parameter maxUses | Type int | Description How many times can this trade be used |
Parameter villagerXp | Type int | Description How much experience does this trade reward the villager |
Parameter priceMultiplier | Type float | Description How much the price is affected by demand, Hero of the Village, and village reputation |