EnchantedItemForEmeralds

Link to enchanteditemforemeralds

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;

已实现的接口

Link to 已实现的接口

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

Constructor #构造函数

Link to constructor-构造函数

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);
参数类型描述
参数
item
类型
ItemDefinition
描述
The Item that is being sold by the villager
参数
baseEmeraldCost
类型
int
描述
The base cost of the trade before any multipliers are applied
参数
maxUses
类型
int
描述
How many times can this trade be used
参数
villagerXp
类型
int
描述
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);
参数类型描述
参数
item
类型
ItemDefinition
描述
The Item that is being sold by the villager
参数
baseEmeraldCost
类型
int
描述
The base cost of the trade before any multipliers are applied
参数
maxUses
类型
int
描述
How many times can this trade be used
参数
villagerXp
类型
int
描述
How much experience does this trade reward the villager
参数
priceMultiplier
类型
float
描述
How much the price is affected by demand, Hero of the Village, and village reputation