ItemsAndEmeraldsToItems
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.
Implements
ItemsAndEmeraldsToItems
implements the following interfaces:
Constructors
new(fromItem as ItemLike, fromCount as int, toItem as Item, toCount as int, maxUses as int, villagerXp as int)
Parameters:
fromCount: int
Type: int
- The amount of the secondary item that is being given to the villager toCount: int
Type: int
- The amount of the item that is being sold by 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(fromItem as ItemLike, fromCount as int, emeraldCost as int, toItem as Item, toCount as int, maxUses as int, villagerXp as int)
Parameters:
fromCount: int
Type: int
- The amount of the secondary item that is being given to the villager emeraldCost: int
Type: int
- How many emeralds will be given to the villager toCount: int
Type: int
- The amount of the item that is being sold by 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 Members
getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer
Parameters:
random: RandomSource
Type: RandomSource
Return Type:
MerchantOffer