ItemsForEmeralds
Link to itemsforemeralds
Diese Klasse importieren
Link to diese-klasse-importieren
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.ItemsForEmeralds;
Implemented Interfaces
Link to implemented-interfaces
ItemsForEmeralds implements the following interfaces. That means all methods defined in these interfaces are also available in ItemsForEmeralds
Constructors
Link to constructors
ZenScript Copynew ItemsForEmeralds(item as ItemDefinition, emeraldCost as int, numberOfItems as int, villagerXp as int) as ItemsForEmeralds
new ItemsForEmeralds(<item:minecraft:diamond>, 2, 4, 2);
Parameter | Type | Beschreibung |
---|---|---|
Parameter item | Type ItemDefinition | Beschreibung The Item that is being sold by the villager |
Parameter emeraldCost | Type int | Beschreibung How many emeralds will be given to the villager |
Parameter numberOfItems | Type int | Beschreibung The amount of the Item being sold to the villager |
Parameter villagerXp | Type int | Beschreibung How much experience does this trade reward the villager |
ZenScript Copynew ItemsForEmeralds(block as Block, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int) as ItemsForEmeralds
new ItemsForEmeralds(<block:minecraft:dirt>, 2, 4, 8, 2);
Parameter | Type | Beschreibung |
---|---|---|
Parameter block | Type Block | Beschreibung The Block that is being sold by the villager |
Parameter emeraldCost | Type int | Beschreibung How many emeralds will be given to the villager |
Parameter numberOfItems | Type int | Beschreibung The amount of the Block being sold to the villager |
Parameter maxUses | Type int | Beschreibung How many times can this trade be used |
Parameter villagerXp | Type int | Beschreibung How much experience does this trade reward the villager |
ZenScript Copynew ItemsForEmeralds(itemStack as ItemStack, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int, priceMultiplier as float) as ItemsForEmeralds
new ItemsForEmeralds(<item:minecraft:diamond>, 2, 4, 8, 2, 0.05);
Parameter | Type | Beschreibung |
---|---|---|
Parameter itemStack | Type Artikel-Stack | Beschreibung The Item that is being sold by the villager |
Parameter emeraldCost | Type int | Beschreibung How many emeralds will be given to the villager |
Parameter numberOfItems | Type int | Beschreibung The amount of the Item being sold to the villager |
Parameter maxUses | Type int | Beschreibung How many times can this trade be used |
Parameter villagerXp | Type int | Beschreibung How much experience does this trade reward the villager |
Parameter priceMultiplier | Type float | Beschreibung How much the price is affected by demand, Hero of the Village, and village reputation |