TippedArrowForItemsAndEmeralds

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.

script.zs
import crafttweaker.api.villager.trade.type.TippedArrowForItemsAndEmeralds;

Implements

TippedArrowForItemsAndEmeralds implements the following interfaces:

ItemListing

Constructors

new(fromItem as Item, fromCount as int, toItem as Item, toCount as int, emeraldCost as int, maxUses as int, villagerXp as int)
script.zs
// new TippedArrowForItemsAndEmeralds(fromItem as ItemDefinition, fromCount as int, toItem as ItemDefinition, toCount as int, emeraldCost as int, maxUses as int, villagerXp as int);
new TippedArrowForItemsAndEmeralds(myItem, myInt, myItem, myInt, myInt, myInt, myInt);

Parameters:

fromItem Type: ItemDefinition - The Item that is being sold by the villager, that will have a random potion effect attached
fromCount Type: int - The amount of the Item being sold to the villager
toItem Type: ItemDefinition - The Item that is being sold by the villager
toCount Type: int - The amount of the item that is being sold by the villager
emeraldCost Type: int - How many emeralds will be given to the villager
maxUses Type: int - How many times can this trade be used
villagerXp Type: int - How much experience does this trade reward the villager

Members

getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer
script.zs
// TippedArrowForItemsAndEmeralds.getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer;
myTippedArrowForItemsAndEmeralds.getOffer(myEntity, myRandomSource);

Parameters:

traderEntity Type: Entity
random Type: RandomSource

Return Type: MerchantOffer