ItemsForEmeralds
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.villager.trade.type.ItemsForEmeralds;
Implements
ItemsForEmeralds
implements the following interfaces:
Constructors
new(block as Block, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int)
// new ItemsForEmeralds(block as Block, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int);new ItemsForEmeralds(myBlock, myInt, myInt, myInt, myInt);
Parameters:
emeraldCost: int
Type: int
- How many emeralds will be given to the villager numberOfItems: int
Type: int
- The amount of the Block being sold to the villager maxUses: int
Type: int
- How many times can this trade be used villagerXp: int
Type: int
- How much experience does this trade reward the villager new(item as Item, emeraldCost as int, numberOfItems as int, villagerXp as int)
// new ItemsForEmeralds(item as ItemDefinition, emeraldCost as int, numberOfItems as int, villagerXp as int);new ItemsForEmeralds(myItem, myInt, myInt, myInt);
Parameters:
emeraldCost: int
Type: int
- How many emeralds will be given to the villager numberOfItems: int
Type: int
- The amount of the Item being sold to the villager villagerXp: int
Type: int
- How much experience does this trade reward the villager new(itemStack as ItemStack, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int)
// new ItemsForEmeralds(itemStack as ItemStack, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int);new ItemsForEmeralds(myItemStack, myInt, myInt, myInt, myInt);
Parameters:
emeraldCost: int
Type: int
- How many emeralds will be given to the villager numberOfItems: int
Type: int
- The amount of the Item being sold to the villager maxUses: int
Type: int
- How many times can this trade be used villagerXp: int
Type: int
- How much experience does this trade reward the villager new(itemStack as ItemStack, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int, priceMultiplier as float)
// new ItemsForEmeralds(itemStack as ItemStack, emeraldCost as int, numberOfItems as int, maxUses as int, villagerXp as int, priceMultiplier as float);new ItemsForEmeralds(myItemStack, myInt, myInt, myInt, myInt, myFloat);
Parameters:
emeraldCost: int
Type: int
- How many emeralds will be given to the villager numberOfItems: int
Type: int
- The amount of the Item being sold to the villager maxUses: int
Type: int
- How many times can this trade be used villagerXp: int
Type: int
- How much experience does this trade reward the villager priceMultiplier: float
Type: float
- How much the price is affected by demand, Hero of the Village, and village reputation Members
getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer
myItemsForEmeralds.getOffer(myEntity, myRandomSource);
Parameters:
random: RandomSource
Type: RandomSource
Return Type:
MerchantOffer