Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.villager.MerchantOffer;
ZenScript
Copy
new MerchantOffer(baseCostA as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
ItemStack
Description
No description provided
Parameter
result
Type
ItemStack
Description
No description provided
Parameter
maxUses
Type
int
Description
No description provided
Parameter
xp
Type
int
Description
No description provided
Parameter
priceMultiplier
Type
float
Description
No description provided
ZenScript
Copy
new MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
ItemStack
Description
No description provided
Parameter
costB
Type
ItemStack
Description
No description provided
Parameter
result
Type
ItemStack
Description
No description provided
Parameter
maxUses
Type
int
Description
No description provided
Parameter
xp
Type
int
Description
No description provided
Parameter
priceMultiplier
Type
float
Description
No description provided
ZenScript
Copy
new MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
ItemStack
Description
No description provided
Parameter
costB
Type
ItemStack
Description
No description provided
Parameter
result
Type
ItemStack
Description
No description provided
Parameter
uses
Type
int
Description
No description provided
Parameter
maxUses
Type
int
Description
No description provided
Parameter
xp
Type
int
Description
No description provided
Parameter
priceMultiplier
Type
float
Description
No description provided
ZenScript
Copy
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) as MerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
ItemStack
Description
No description provided
Parameter
costB
Type
ItemStack
Description
No description provided
Parameter
result
Type
ItemStack
Description
No description provided
Parameter
uses
Type
int
Description
No description provided
Parameter
maxUses
Type
int
Description
No description provided
Parameter
xp
Type
int
Description
No description provided
Parameter
priceMultiplier
Type
float
Description
No description provided
Parameter
demand
Type
int
Description
No description provided

Link to addToSpecialPriceDiff

Name: addToSpecialPriceDiff

Return Type: void

ZenScript
Copy
MerchantOffer.addToSpecialPriceDiff(specialPriceDiff as int) as void
ParameterTypeDescription
Parameter
specialPriceDiff
Type
int
Description
No Description Provided

Name: assemble

Return Type: IItemStack

ZenScript
Copy
// MerchantOffer.assemble() as IItemStack

myMerchantOffer.assemble();

Name: createTag

Return Type: MapData

ZenScript
Copy
// MerchantOffer.createTag() as MapData

myMerchantOffer.createTag();

Name: getBaseCostA

Return Type: IItemStack

ZenScript
Copy
// MerchantOffer.getBaseCostA() as IItemStack

myMerchantOffer.getBaseCostA();

Name: getCostA

Return Type: IItemStack

ZenScript
Copy
// MerchantOffer.getCostA() as IItemStack

myMerchantOffer.getCostA();

Name: getCostB

Return Type: IItemStack

ZenScript
Copy
// MerchantOffer.getCostB() as IItemStack

myMerchantOffer.getCostB();

Name: getDemand

Return Type: int

ZenScript
Copy
// MerchantOffer.getDemand() as int

myMerchantOffer.getDemand();

Name: getMaxUses

Return Type: int

ZenScript
Copy
// MerchantOffer.getMaxUses() as int

myMerchantOffer.getMaxUses();

Link to getPriceMultiplier

Name: getPriceMultiplier

Return Type: float

ZenScript
Copy
// MerchantOffer.getPriceMultiplier() as float

myMerchantOffer.getPriceMultiplier();

Name: getResult

Return Type: IItemStack

ZenScript
Copy
// MerchantOffer.getResult() as IItemStack

myMerchantOffer.getResult();

Link to getSpecialPriceDiff

Name: getSpecialPriceDiff

Return Type: int

ZenScript
Copy
// MerchantOffer.getSpecialPriceDiff() as int

myMerchantOffer.getSpecialPriceDiff();

Name: getUses

Return Type: int

ZenScript
Copy
// MerchantOffer.getUses() as int

myMerchantOffer.getUses();

Name: getXp

Return Type: int

ZenScript
Copy
// MerchantOffer.getXp() as int

myMerchantOffer.getXp();

Name: increaseUses

Return Type: void

ZenScript
Copy
// MerchantOffer.increaseUses() as void

myMerchantOffer.increaseUses();

Name: isOutOfStock

Return Type: boolean

ZenScript
Copy
// MerchantOffer.isOutOfStock() as boolean

myMerchantOffer.isOutOfStock();

Name: needsRestock

Return Type: boolean

ZenScript
Copy
// MerchantOffer.needsRestock() as boolean

myMerchantOffer.needsRestock();

Link to resetSpecialPriceDiff

Name: resetSpecialPriceDiff

Return Type: void

ZenScript
Copy
// MerchantOffer.resetSpecialPriceDiff() as void

myMerchantOffer.resetSpecialPriceDiff();

Name: resetUses

Return Type: void

ZenScript
Copy
// MerchantOffer.resetUses() as void

myMerchantOffer.resetUses();

Name: satisfiedBy

Return Type: boolean

ZenScript
Copy
MerchantOffer.satisfiedBy(a as IItemStack, b as IItemStack) as boolean
ParameterTypeDescription
Parameter
a
Type
IItemStack
Description
No Description Provided
Parameter
b
Type
IItemStack
Description
No Description Provided

Link to setSpecialPriceDiff

Name: setSpecialPriceDiff

Return Type: void

ZenScript
Copy
MerchantOffer.setSpecialPriceDiff(specialPriceDiff as int) as void
ParameterTypeDescription
Parameter
specialPriceDiff
Type
int
Description
No Description Provided

Name: setToOutOfStock

Return Type: void

ZenScript
Copy
// MerchantOffer.setToOutOfStock() as void

myMerchantOffer.setToOutOfStock();

Name: shouldRewardExp

Return Type: boolean

ZenScript
Copy
// MerchantOffer.shouldRewardExp() as boolean

myMerchantOffer.shouldRewardExp();

Name: take

Return Type: boolean

ZenScript
Copy
MerchantOffer.take(a as IItemStack, b as IItemStack) as boolean
ParameterTypeDescription
Parameter
a
Type
IItemStack
Description
No Description Provided
Parameter
b
Type
IItemStack
Description
No Description Provided

Name: updateDemand

Return Type: void

ZenScript
Copy
// MerchantOffer.updateDemand() as void

myMerchantOffer.updateDemand();
NameTypeHas GetterHas SetterDescription
Name
baseCostA
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
costA
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
costB
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
demand
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
maxUses
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
needsRestock
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
outOfStock
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
priceMultiplier
Type
float
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
result
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
shouldRewardExp
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
specialPriceDiff
Type
int
Has Getter
true
Has Setter
true
Description
No Description Provided
Name
uses
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
xp
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided