EmeraldsForVillagerTypeItem
Link to emeraldsforvillagertypeitem
导入类
Link to 导入类
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.EmeraldsForVillagerTypeItem;
已实现的接口
Link to 已实现的接口
EmeraldsForVillagerTypeItem implements the following interfaces. That means all methods defined in these interfaces are also available in EmeraldsForVillagerTypeItem
Static Methods
Link to static-methods
Name: create
Creates a new EmeraldsForVillagerTypeItem trade
Returns: A new EmeraldsForVillagerTypeItem
Return Type: EmeraldsForVillagerTypeItem
ZenScript Copy// EmeraldsForVillagerTypeItem.create(cost as int, maxUses as int, villagerXp as int, trades as IItemStack[VillagerType]) as EmeraldsForVillagerTypeItem
EmeraldsForVillagerTypeItem.create(1, 16, 2, {<villagertype:minecraft:desert>: <item:minecraft:sand>, <villagertype:minecraft:plains>: <item:minecraft:dirt>});
参数 | 类型 | 描述 |
---|---|---|
参数 cost | 类型 int | 描述 How many emeralds should the map cost |
参数 maxUses | 类型 int | 描述 How many times this trade can be used |
参数 villagerXp | 类型 int | 描述 How much experience does this trade reward the villager |
参数 trades | 类型 IItemStack[VillagerType] | 描述 A map of VillagerType to ItemDefinition trades |