Importare la Classe

Link to importare-la-classe

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
ParametroTipo
Parametro
baseCostA
Tipo
ItemStack
Parametro
result
Tipo
ItemStack
Parametro
maxUses
Tipo
int
Parametro
xp
Tipo
int
Parametro
priceMultiplier
Tipo
float
ZenScript
Copy
new MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
ParametroTipo
Parametro
baseCostA
Tipo
ItemStack
Parametro
costB
Tipo
ItemStack
Parametro
result
Tipo
ItemStack
Parametro
maxUses
Tipo
int
Parametro
xp
Tipo
int
Parametro
priceMultiplier
Tipo
float
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
ParametroTipo
Parametro
baseCostA
Tipo
ItemStack
Parametro
costB
Tipo
ItemStack
Parametro
result
Tipo
ItemStack
Parametro
uses
Tipo
int
Parametro
maxUses
Tipo
int
Parametro
xp
Tipo
int
Parametro
priceMultiplier
Tipo
float
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
ParametroTipo
Parametro
baseCostA
Tipo
ItemStack
Parametro
costB
Tipo
ItemStack
Parametro
result
Tipo
ItemStack
Parametro
uses
Tipo
int
Parametro
maxUses
Tipo
int
Parametro
xp
Tipo
int
Parametro
priceMultiplier
Tipo
float
Parametro
demand
Tipo
int

Link to addToSpecialPriceDiff

Name: addToSpecialPriceDiff

ZenScript
Copy
MerchantOffer.addToSpecialPriceDiff(specialPriceDiff as int)
ParametroTipo
Parametro
specialPriceDiff
Tipo
int

Name: assemble

Return Type: IItemStack

ZenScript
Copy
// MerchantOffer.assemble() as IItemStack

myMerchantOffer.assemble();

Name: createTag

Return Type: IData

ZenScript
Copy
// MerchantOffer.createTag() as IData

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

ZenScript
Copy
// MerchantOffer.increaseUses()

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

ZenScript
Copy
// MerchantOffer.resetSpecialPriceDiff()

myMerchantOffer.resetSpecialPriceDiff();

Name: resetUses

ZenScript
Copy
// MerchantOffer.resetUses()

myMerchantOffer.resetUses();

Name: satisfiedBy

Return Type: boolean

ZenScript
Copy
MerchantOffer.satisfiedBy(a as IItemStack, b as IItemStack) as boolean
ParametroTipo
Parametro
a
Tipo
IItemStack
Parametro
b
Tipo
IItemStack

Link to setSpecialPriceDiff

Name: setSpecialPriceDiff

ZenScript
Copy
MerchantOffer.setSpecialPriceDiff(specialPriceDiff as int)
ParametroTipo
Parametro
specialPriceDiff
Tipo
int

Name: setToOutOfStock

ZenScript
Copy
// MerchantOffer.setToOutOfStock()

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
ParametroTipo
Parametro
a
Tipo
IItemStack
Parametro
b
Tipo
IItemStack

Name: updateDemand

ZenScript
Copy
// MerchantOffer.updateDemand()

myMerchantOffer.updateDemand();
NomeTipoHa GetterHa Setter
Nome
baseCostA
Tipo
IItemStack
Ha Getter
Ha Setter
no
Nome
costA
Tipo
IItemStack
Ha Getter
Ha Setter
no
Nome
costB
Tipo
IItemStack
Ha Getter
Ha Setter
no
Nome
demand
Tipo
int
Ha Getter
Ha Setter
no
Nome
maxUses
Tipo
int
Ha Getter
Ha Setter
no
Nome
needsRestock
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
outOfStock
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
priceMultiplier
Tipo
float
Ha Getter
Ha Setter
no
Nome
result
Tipo
IItemStack
Ha Getter
Ha Setter
no
Nome
shouldRewardExp
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
specialPriceDiff
Tipo
int
Ha Getter
Ha Setter
Nome
uses
Tipo
int
Ha Getter
Ha Setter
no
Nome
xp
Tipo
int
Ha Getter
Ha Setter
no