BasicItemListing

Link to basicitemlisting

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.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
Copy
new 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