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.MCMerchantOffer;
ZenScript
Copy
new MCMerchantOffer(baseCostA as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MCMerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
format@@0 ItemStack
Description
No description provided
Parameter
result
Type
format@@0 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 MCMerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MCMerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
format@@0 ItemStack
Description
No description provided
Parameter
costB
Type
format@@0 ItemStack
Description
No description provided
Parameter
result
Type
format@@0 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 MCMerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float) as MCMerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
format@@0 ItemStack
Description
No description provided
Parameter
costB
Type
format@@0 ItemStack
Description
No description provided
Parameter
result
Type
format@@0 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 MCMerchantOffer(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 MCMerchantOffer
ParameterTypeDescription
Parameter
baseCostA
Type
format@@0 ItemStack
Description
No description provided
Parameter
costB
Type
format@@0 ItemStack
Description
No description provided
Parameter
result
Type
format@@0 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

Name: calculateDemand

Return Type: void

ZenScript
Copy
// MCMerchantOffer.calculateDemand() as void

myMCMerchantOffer.calculateDemand();

Name: doTransaction

Return Type: boolean

ZenScript
Copy
MCMerchantOffer.doTransaction(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 getBuyingStackFirst

Name: getBuyingStackFirst

Return Type: IItemStack

ZenScript
Copy
// MCMerchantOffer.getBuyingStackFirst() as IItemStack

myMCMerchantOffer.getBuyingStackFirst();

Link to getBuyingStackSecond

Name: getBuyingStackSecond

Return Type: IItemStack

ZenScript
Copy
// MCMerchantOffer.getBuyingStackSecond() as IItemStack

myMCMerchantOffer.getBuyingStackSecond();

Link to getCopyOfSellingStack

Name: getCopyOfSellingStack

Return Type: IItemStack

ZenScript
Copy
// MCMerchantOffer.getCopyOfSellingStack() as IItemStack

myMCMerchantOffer.getCopyOfSellingStack();

Name: getDemand

Return Type: int

ZenScript
Copy
// MCMerchantOffer.getDemand() as int

myMCMerchantOffer.getDemand();

Link to getDiscountedBuyingStackFirst

Name: getDiscountedBuyingStackFirst

Return Type: IItemStack

ZenScript
Copy
// MCMerchantOffer.getDiscountedBuyingStackFirst() as IItemStack

myMCMerchantOffer.getDiscountedBuyingStackFirst();

Link to getDoesRewardExp

Name: getDoesRewardExp

Return Type: boolean

ZenScript
Copy
// MCMerchantOffer.getDoesRewardExp() as boolean

myMCMerchantOffer.getDoesRewardExp();

Name: getGivenExp

Return Type: int

ZenScript
Copy
// MCMerchantOffer.getGivenExp() as int

myMCMerchantOffer.getGivenExp();

Name: getMaxUses

Return Type: int

ZenScript
Copy
// MCMerchantOffer.getMaxUses() as int

myMCMerchantOffer.getMaxUses();

Link to getPriceMultiplier

Name: getPriceMultiplier

Return Type: float

ZenScript
Copy
// MCMerchantOffer.getPriceMultiplier() as float

myMCMerchantOffer.getPriceMultiplier();

Name: getSellingStack

Return Type: IItemStack

ZenScript
Copy
// MCMerchantOffer.getSellingStack() as IItemStack

myMCMerchantOffer.getSellingStack();

Name: getSpecialPrice

Return Type: int

ZenScript
Copy
// MCMerchantOffer.getSpecialPrice() as int

myMCMerchantOffer.getSpecialPrice();

Name: getUses

Return Type: int

ZenScript
Copy
// MCMerchantOffer.getUses() as int

myMCMerchantOffer.getUses();

Name: hasBeenUsed

Return Type: boolean

ZenScript
Copy
// MCMerchantOffer.hasBeenUsed() as boolean

myMCMerchantOffer.hasBeenUsed();

Name: hasNoUsesLeft

Return Type: boolean

ZenScript
Copy
// MCMerchantOffer.hasNoUsesLeft() as boolean

myMCMerchantOffer.hasNoUsesLeft();

Link to increaseSpecialPrice

Name: increaseSpecialPrice

Return Type: void

ZenScript
Copy
MCMerchantOffer.increaseSpecialPrice(specialPrice as int) as void
ParameterTypeDescription
Parameter
specialPrice
Type
int
Description
No Description Provided

Name: increaseUses

Return Type: void

ZenScript
Copy
// MCMerchantOffer.increaseUses() as void

myMCMerchantOffer.increaseUses();

Name: makeUnavailable

Return Type: void

ZenScript
Copy
// MCMerchantOffer.makeUnavailable() as void

myMCMerchantOffer.makeUnavailable();

Name: matches

Return Type: boolean

ZenScript
Copy
MCMerchantOffer.matches(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 resetSpecialPrice

Name: resetSpecialPrice

Return Type: void

ZenScript
Copy
// MCMerchantOffer.resetSpecialPrice() as void

myMCMerchantOffer.resetSpecialPrice();

Name: resetUses

Return Type: void

ZenScript
Copy
// MCMerchantOffer.resetUses() as void

myMCMerchantOffer.resetUses();

Name: setSpecialPrice

Return Type: void

ZenScript
Copy
MCMerchantOffer.setSpecialPrice(specialPrice as int) as void
ParameterTypeDescription
Parameter
specialPrice
Type
int
Description
No Description Provided

Name: write

Return Type: IData

ZenScript
Copy
// MCMerchantOffer.write() as IData

myMCMerchantOffer.write();
NameTypeHas GetterHas SetterDescription
Name
buyingStackFirst
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
buyingStackSecond
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
copyOfSellingStack
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
discountedBuyingStackFirst
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
doesRewardExp
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
givenExp
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
hasBeenUsed
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
hasNoUsesLeft
Type
boolean
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
priceMultiplier
Type
float
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
sellingStack
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
specialPrice
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
uses
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided