ItemsAndEmeraldsToItems

Link to itemsandemeraldstoitems

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.ItemsAndEmeraldsToItems;

已实现的接口

Link to 已实现的接口

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

Constructor #构造函数

Link to constructor-构造函数

ZenScript
Copy
new ItemsAndEmeraldsToItems(fromItem as ItemLike, fromCount as int, toItem as ItemDefinition, toCount as int, maxUses as int, villagerXp as int) as ItemsAndEmeraldsToItems
new ItemsAndEmeraldsToItems(<item:minecraft:dirt>, 4, <item:minecraft:diamond>, 1, 8, 2);
参数类型描述
参数
fromItem
类型
ItemLike
描述
The secondary item that is being given to the villager
参数
fromCount
类型
int
描述
The amount of the secondary item that is being given to the villager
参数
toItem
类型
ItemDefinition
描述
The Item that is being sold by the villager
参数
toCount
类型
int
描述
The amount of the item that is being sold by the villager
参数
maxUses
类型
int
描述
How many times can this trade be used
参数
villagerXp
类型
int
描述
How much experience does this trade reward the villager
ZenScript
Copy
new ItemsAndEmeraldsToItems(fromItem as ItemLike, fromCount as int, emeraldCost as int, toItem as ItemDefinition, toCount as int, maxUses as int, villagerXp as int) as ItemsAndEmeraldsToItems
new ItemsAndEmeraldsToItems(<item:minecraft:dirt>, 4, 2, <item:minecraft:diamond>, 1, 8, 2);
参数类型描述
参数
fromItem
类型
ItemLike
描述
The secondary item that is being given to the villager
参数
fromCount
类型
int
描述
The amount of the secondary item that is being given to the villager
参数
emeraldCost
类型
int
描述
How many emeralds will be given to the villager
参数
toItem
类型
ItemDefinition
描述
The Item that is being sold by the villager
参数
toCount
类型
int
描述
The amount of the item that is being sold by the villager
参数
maxUses
类型
int
描述
How many times can this trade be used
参数
villagerXp
类型
int
描述
How much experience does this trade reward the villager