EmeraldsForVillagerTypeItem
Link to emeraldsforvillagertypeitem
Importing the class
Link to importing-the-class
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;
Implemented Interfaces
Link to implemented-interfaces
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>});
Parameter | Type | Description |
---|---|---|
Parameter cost | Type int | Description How many emeralds should the map cost |
Parameter maxUses | Type int | Description How many times this trade can be used |
Parameter villagerXp | Type int | Description How much experience does this trade reward the villager |
Parameter trades | Type IItemStack[VillagerType] | Description A map of VillagerType to ItemDefinition trades |