MerchantOffer
Link to merchantoffer
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 Copyimport crafttweaker.api.villager.MerchantOffer;
Constructors
Link to constructors
ZenScript Copynew MerchantOffer(baseCostA as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
Parameter | Type |
---|---|
Parameter baseCostA | Type Stos przedmiotów |
Parameter result | Type Stos przedmiotów |
Parameter maxUses | Type int |
Parameter xp | Type int |
Parameter priceMultiplier | Type float |
ZenScript Copynew MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
Parameter | Type |
---|---|
Parameter baseCostA | Type Stos przedmiotów |
Parameter costB | Type Stos przedmiotów |
Parameter result | Type Stos przedmiotów |
Parameter maxUses | Type int |
Parameter xp | Type int |
Parameter priceMultiplier | Type float |
ZenScript Copynew MerchantOffer(baseCostA as ItemStack, costB as ItemStack, result as ItemStack, uses as int, maxUses as int, xp as int, priceMultiplier as float) as MerchantOffer
Parameter | Type |
---|---|
Parameter baseCostA | Type Stos przedmiotów |
Parameter costB | Type Stos przedmiotów |
Parameter result | Type Stos przedmiotów |
Parameter uses | Type int |
Parameter maxUses | Type int |
Parameter xp | Type int |
Parameter priceMultiplier | Type float |
ZenScript Copynew 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
Parameter | Type |
---|---|
Parameter baseCostA | Type Stos przedmiotów |
Parameter costB | Type Stos przedmiotów |
Parameter result | Type Stos przedmiotów |
Parameter uses | Type int |
Parameter maxUses | Type int |
Parameter xp | Type int |
Parameter priceMultiplier | Type float |
Parameter demand | Type int |
Methods
Link to methods
Name: addToSpecialPriceDiff
ZenScript CopyMerchantOffer.addToSpecialPriceDiff(specialPriceDiff as int)
Parameter | Type |
---|---|
Parameter specialPriceDiff | Type 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();
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();
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();
Name: resetSpecialPriceDiff
ZenScript Copy// MerchantOffer.resetSpecialPriceDiff()
myMerchantOffer.resetSpecialPriceDiff();
Name: resetUses
ZenScript Copy// MerchantOffer.resetUses()
myMerchantOffer.resetUses();
Name: satisfiedBy
Return Type: boolean
ZenScript CopyMerchantOffer.satisfiedBy(a as IItemStack, b as IItemStack) as boolean
Parameter | Type |
---|---|
Parameter ob z | Type IItemStack |
Parameter b | Type IItemStack |
Name: setSpecialPriceDiff
ZenScript CopyMerchantOffer.setSpecialPriceDiff(specialPriceDiff as int)
Parameter | Type |
---|---|
Parameter specialPriceDiff | Type 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 CopyMerchantOffer.take(a as IItemStack, b as IItemStack) as boolean
Parameter | Type |
---|---|
Parameter ob z | Type IItemStack |
Parameter b | Type IItemStack |
Name: updateDemand
ZenScript Copy// MerchantOffer.updateDemand()
myMerchantOffer.updateDemand();
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name baseCostA | Type IItemStack | Has Getter true | Has Setter false |
Name costA | Type IItemStack | Has Getter true | Has Setter false |
Name costB | Type IItemStack | Has Getter true | Has Setter false |
Name demand | Type int | Has Getter true | Has Setter false |
Name maxUses | Type int | Has Getter true | Has Setter false |
Name needsRestock | Type boolean | Has Getter true | Has Setter false |
Name outOfStock | Type boolean | Has Getter true | Has Setter false |
Name priceMultiplier | Type float | Has Getter true | Has Setter false |
Name result | Type IItemStack | Has Getter true | Has Setter false |
Name shouldRewardExp | Type boolean | Has Getter true | Has Setter false |
Name specialPriceDiff | Type int | Has Getter true | Has Setter true |
Name uses | Type int | Has Getter true | Has Setter false |
Name xp | Type int | Has Getter true | Has Setter false |