HomeCommandsExamplesGetting Started With ScriptsGlobal Keywords
BracketDumpersBracketHandlersBracketValidatorsResourceLocationBracketHandler

MerchantOffer

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

Constructors

new(baseCostA as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float)
script.zs
// new MerchantOffer(baseCostA as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float);
new MerchantOffer(myItemStack, myItemStack, myInt, myInt, myFloat);

Parameters:

baseCostA Type: ItemStack
result Type: ItemStack
maxUses Type: int
xp Type: int
priceMultiplier Type: float
new(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float)
script.zs
// new MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float);
new MerchantOffer(myItemStack, myItemStack, myItemStack, myInt, myInt, myFloat);

Parameters:

baseCostA Type: ItemStack
costB Type: ItemStack
result Type: ItemStack
maxUses Type: int
xp Type: int
priceMultiplier Type: float
new(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float)
script.zs
// new MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float);
new MerchantOffer(myItemStack, myItemStack, myItemStack, myInt, myInt, myInt, myFloat);

Parameters:

baseCostA Type: ItemStack
costB Type: ItemStack
result Type: ItemStack
uses Type: int
maxUses Type: int
xp Type: int
priceMultiplier Type: float
new(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float, demand as int)
script.zs
// new MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float, demand as int);
new MerchantOffer(myItemStack, myItemStack, myItemStack, myInt, myInt, myInt, myFloat, myInt);

Parameters:

baseCostA Type: ItemStack
costB Type: ItemStack
result Type: ItemStack
uses Type: int
maxUses Type: int
xp Type: int
priceMultiplier Type: float
demand Type: int

Members

addToSpecialPriceDiff(specialPriceDiff as int)
script.zs
// MerchantOffer.addToSpecialPriceDiff(specialPriceDiff as int);
myMerchantOffer.addToSpecialPriceDiff(myInt);

Parameters:

specialPriceDiff Type: int
assemble() as IItemStack
script.zs
// MerchantOffer.assemble() as IItemStack;
myMerchantOffer.assemble();

Return Type: IItemStack

Getter
script.zs
// MerchantOffer.baseCostA as IItemStack
myMerchantOffer.baseCostA

Return Type: IItemStack

baseCostA() as IItemStack
script.zs
// MerchantOffer.baseCostA() as IItemStack;
myMerchantOffer.baseCostA();

Return Type: IItemStack

Getter
script.zs
// MerchantOffer.costA as IItemStack
myMerchantOffer.costA

Return Type: IItemStack

costA() as IItemStack
script.zs
// MerchantOffer.costA() as IItemStack;
myMerchantOffer.costA();

Return Type: IItemStack

Getter
script.zs
// MerchantOffer.costB as IItemStack
myMerchantOffer.costB

Return Type: IItemStack

costB() as IItemStack
script.zs
// MerchantOffer.costB() as IItemStack;
myMerchantOffer.costB();

Return Type: IItemStack

createTag() as IData
script.zs
// MerchantOffer.createTag() as IData;
myMerchantOffer.createTag();

Return Type: IData

Getter
script.zs
// MerchantOffer.demand as int
myMerchantOffer.demand

Return Type: int

demand() as int
script.zs
// MerchantOffer.demand() as int;
myMerchantOffer.demand();

Return Type: int

increaseUses()
script.zs
// MerchantOffer.increaseUses();
myMerchantOffer.increaseUses();
Getter
script.zs
// MerchantOffer.maxUses as int
myMerchantOffer.maxUses

Return Type: int

maxUses() as int
script.zs
// MerchantOffer.maxUses() as int;
myMerchantOffer.maxUses();

Return Type: int

Getter
script.zs
// MerchantOffer.needsRestock as bool
myMerchantOffer.needsRestock

Return Type: bool

needsRestock() as bool
script.zs
// MerchantOffer.needsRestock() as bool;
myMerchantOffer.needsRestock();

Return Type: bool

Getter
script.zs
// MerchantOffer.outOfStock as bool
myMerchantOffer.outOfStock

Return Type: bool

outOfStock() as bool
script.zs
// MerchantOffer.outOfStock() as bool;
myMerchantOffer.outOfStock();

Return Type: bool

Getter
script.zs
// MerchantOffer.priceMultiplier as float
myMerchantOffer.priceMultiplier

Return Type: float

priceMultiplier() as float
script.zs
// MerchantOffer.priceMultiplier() as float;
myMerchantOffer.priceMultiplier();

Return Type: float

resetSpecialPriceDiff()
script.zs
// MerchantOffer.resetSpecialPriceDiff();
myMerchantOffer.resetSpecialPriceDiff();
resetUses()
script.zs
// MerchantOffer.resetUses();
myMerchantOffer.resetUses();
Getter
script.zs
// MerchantOffer.result as IItemStack
myMerchantOffer.result

Return Type: IItemStack

result() as IItemStack
script.zs
// MerchantOffer.result() as IItemStack;
myMerchantOffer.result();

Return Type: IItemStack

satisfiedBy(a as IItemStack, b as IItemStack) as bool
script.zs
// MerchantOffer.satisfiedBy(a as IItemStack, b as IItemStack) as bool;
myMerchantOffer.satisfiedBy(myIItemStack, myIItemStack);

Parameters:

Return Type: bool

setToOutOfStock()
script.zs
// MerchantOffer.setToOutOfStock();
myMerchantOffer.setToOutOfStock();
Getter
script.zs
// MerchantOffer.shouldRewardExp as bool
myMerchantOffer.shouldRewardExp

Return Type: bool

shouldRewardExp() as bool
script.zs
// MerchantOffer.shouldRewardExp() as bool;
myMerchantOffer.shouldRewardExp();

Return Type: bool

Getter
script.zs
// MerchantOffer.specialPriceDiff as int
myMerchantOffer.specialPriceDiff

Return Type: int

Setter
script.zs
// MerchantOffer.specialPriceDiff = (specialPriceDiff as int);
myMerchantOffer.specialPriceDiff = myInt;

Parameters:

specialPriceDiff Type: int
specialPriceDiff() as int
script.zs
// MerchantOffer.specialPriceDiff() as int;
myMerchantOffer.specialPriceDiff();

Return Type: int

specialPriceDiff(specialPriceDiff as int)
script.zs
// MerchantOffer.specialPriceDiff(specialPriceDiff as int);
myMerchantOffer.specialPriceDiff(myInt);

Parameters:

specialPriceDiff Type: int
take(a as IItemStack, b as IItemStack) as bool
script.zs
// MerchantOffer.take(a as IItemStack, b as IItemStack) as bool;
myMerchantOffer.take(myIItemStack, myIItemStack);

Parameters:

Return Type: bool

updateDemand()
script.zs
// MerchantOffer.updateDemand();
myMerchantOffer.updateDemand();
Getter
script.zs
// MerchantOffer.uses as int
myMerchantOffer.uses

Return Type: int

uses() as int
script.zs
// MerchantOffer.uses() as int;
myMerchantOffer.uses();

Return Type: int

Getter
script.zs
// MerchantOffer.xp as int
myMerchantOffer.xp

Return Type: int

xp() as int
script.zs
// MerchantOffer.xp() as int;
myMerchantOffer.xp();

Return Type: int