BasicItemListing
Link to basicitemlisting
导入类
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.BasicItemListing;
已实现的接口
Link to 已实现的接口
BasicItemListing implements the following interfaces. That means all methods defined in these interfaces are also available in BasicItemListing
Constructor #构造函数
Link to constructor-构造函数
ZenScript Copynew BasicItemListing(price as ItemStack, price2 as ItemStack, forSale as ItemStack, maxTrades as int, xp as int, priceMult as float) as BasicItemListing
new BasicItemListing(<item:minecraft:diamond>, <item:minecraft:diamond>, <item:minecraft:diamond>, 8, 2, 0.05);
参数 | 类型 | 描述 |
---|---|---|
参数 price | 类型 物品应用 | 描述 The primary Item that is being given to the villager |
参数 price2 | 类型 物品应用 | 描述 The secondary item that is being given to the villager |
参数 forSale | 类型 物品应用 | 描述 The Item that is being sold by the villager |
参数 maxTrades | 类型 int | 描述 How many times can this trade be used |
参数 xp (经验值) | 类型 int | 描述 How much experience does this trade reward the villager |
参数 priceMult | 类型 float | 描述 How much the price is affected by demand, Hero of the Village, and village reputation |