EmeraldsForVillagerTypeItem
Link to emeraldsforvillagertypeitem
Importare la Classe
Link to importare-la-classe
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;
Interfacce Implementate
Link to interfacce-implementate
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>});
Parametro | Tipo | Descrizione |
---|---|---|
Parametro cost | Tipo int | Descrizione How many emeralds should the map cost |
Parametro maxUses | Tipo int | Descrizione How many times this trade can be used |
Parametro villagerXp | Tipo int | Descrizione How much experience does this trade reward the villager |
Parametro trades | Tipo IItemStack[VillagerType] | Descrizione A map of VillagerType to ItemDefinition trades |