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.
import crafttweaker.api.villager.trade.type.ItemsAndEmeraldsToItems;
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)
// new ItemsAndEmeraldsToItems(fromItem as ItemLike, fromCount as int, toItem as ItemDefinition, toCount as int, maxUses as int, villagerXp as int);new ItemsAndEmeraldsToItems(myItemLike, myInt, myItem, myInt, myInt, myInt);
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)
// new ItemsAndEmeraldsToItems(fromItem as ItemLike, fromCount as int, emeraldCost as int, toItem as ItemDefinition, toCount as int, maxUses as int, villagerXp as int);new ItemsAndEmeraldsToItems(myItemLike, myInt, myInt, myItem, myInt, myInt, myInt);
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
// ItemsAndEmeraldsToItems.getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer;myItemsAndEmeraldsToItems.getOffer(myEntity, myRandomSource);
Parameters:
random: RandomSource
Type: RandomSource
Return Type:
MerchantOffer