DyedArmorForEmeralds

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.DyedArmorForEmeralds;

Implements

DyedArmorForEmeralds implements the following interfaces:

ItemListing

Constructors

new(item as Item, value as int)
script.zs
// new DyedArmorForEmeralds(item as ItemDefinition, value as int);
new DyedArmorForEmeralds(myItem, myInt);

Parameters:

item Type: ItemDefinition - The Item that is being sold by the villager, dyed a random color
value Type: int - How many emeralds will this trade cost
new(item as Item, value as int, maxUses as int, villagerXp as int)
script.zs
// new DyedArmorForEmeralds(item as ItemDefinition, value as int, maxUses as int, villagerXp as int);
new DyedArmorForEmeralds(myItem, myInt, myInt, myInt);

Parameters:

item Type: ItemDefinition - The Item that is being sold by the villager, dyed a random color
value Type: int - How many emeralds will this trade cost
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
// DyedArmorForEmeralds.getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer;
myDyedArmorForEmeralds.getOffer(myEntity, myRandomSource);

Parameters:

traderEntity Type: Entity
random Type: RandomSource

Return Type: MerchantOffer