EnchantedItemForEmeralds
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.EnchantedItemForEmeralds;
Implements
EnchantedItemForEmeralds
implements the following interfaces:
Constructors
new(item as Item, baseEmeraldCost as int, maxUses as int, villagerXp as int)
// new EnchantedItemForEmeralds(item as ItemDefinition, baseEmeraldCost as int, maxUses as int, villagerXp as int);new EnchantedItemForEmeralds(myItem, myInt, myInt, myInt);
Parameters:
baseEmeraldCost: int
Type: int
- The base cost of the trade before any multipliers are applied 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, baseEmeraldCost as int, maxUses as int, villagerXp as int, priceMultiplier as float)
// new EnchantedItemForEmeralds(item as ItemDefinition, baseEmeraldCost as int, maxUses as int, villagerXp as int, priceMultiplier as float);new EnchantedItemForEmeralds(myItem, myInt, myInt, myInt, myFloat);
Parameters:
baseEmeraldCost: int
Type: int
- The base cost of the trade before any multipliers are applied 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
// EnchantedItemForEmeralds.getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer;myEnchantedItemForEmeralds.getOffer(myEntity, myRandomSource);
Parameters:
random: RandomSource
Type: RandomSource
Return Type:
MerchantOffer