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
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 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
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 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
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 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
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

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();
이름TypeHas GetterHas SetterDescription
이름
buyingStackFirst
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
buyingStackSecond
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
copyOfSellingStack
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
demand
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
discountedBuyingStackFirst
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
doesRewardExp
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
givenExp
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
hasBeenUsed
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
hasNoUsesLeft
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
maxUses
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
priceMultiplier
Type
float
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
sellingStack
Type
IItemStack
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
specialPrice
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
이름
uses
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided