BasicTradeListing
Link to basictradelisting
导入类
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.BasicTradeListing;
已实现的接口
Link to 已实现的接口
BasicTradeListing implements the following interfaces. That means all methods defined in these interfaces are also available in BasicTradeListing
Constructor #构造函数
Link to constructor-构造函数
ZenScript Copynew BasicTradeListing(emeralds as int, forSale as ItemStack, maxTrades as int, xp as int) as BasicTradeListing
参数 | 类型 |
---|---|
参数 emeralds | 类型 int |
参数 forSale | 类型 物品应用 |
参数 maxTrades | 类型 int |
参数 xp (经验值) | 类型 int |
ZenScript Copynew BasicTradeListing(price as ItemStack, forSale as ItemStack, maxTrades as int, xp as int, priceMult as float) as BasicTradeListing
参数 | 类型 |
---|---|
参数 price | 类型 物品应用 |
参数 forSale | 类型 物品应用 |
参数 maxTrades | 类型 int |
参数 xp (经验值) | 类型 int |
参数 priceMult | 类型 float |
ZenScript Copynew BasicTradeListing(price as ItemStack, price2 as ItemStack, forSale as ItemStack, maxTrades as int, xp as int, priceMult as float) as BasicTradeListing
参数 | 类型 |
---|---|
参数 price | 类型 物品应用 |
参数 price2 | 类型 物品应用 |
参数 forSale | 类型 物品应用 |
参数 maxTrades | 类型 int |
参数 xp (经验值) | 类型 int |
参数 priceMult | 类型 float |
使用方式
Link to 使用方式
Name: getForSale
Return Type: ItemStack
ZenScript Copy// BasicTradeListing.getForSale() as ItemStack
myBasicTradeListing.getForSale();
Name: getMaxTrades
Return Type: int
ZenScript Copy// BasicTradeListing.getMaxTrades() as int
myBasicTradeListing.getMaxTrades();
Name: getPrice
Return Type: ItemStack
ZenScript Copy// BasicTradeListing.getPrice() as ItemStack
myBasicTradeListing.getPrice();
Name: getPrice2
Return Type: ItemStack
ZenScript Copy// BasicTradeListing.getPrice2() as ItemStack
myBasicTradeListing.getPrice2();
Name: getPriceMult
Return Type: float
ZenScript Copy// BasicTradeListing.getPriceMult() as float
myBasicTradeListing.getPriceMult();
Name: getXp
Return Type: int
ZenScript Copy// BasicTradeListing.getXp() as int
myBasicTradeListing.getXp();
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 forSale | 类型 物品应用 | 可获得 true | 可设置 false |
名称 maxTrades | 类型 int | 可获得 true | 可设置 false |
名称 price | 类型 物品应用 | 可获得 true | 可设置 false |
名称 price2 | 类型 物品应用 | 可获得 true | 可设置 false |
名称 priceMult | 类型 float | 可获得 true | 可设置 false |
名称 xp (经验值) | 类型 int | 可获得 true | 可设置 false |