Merchant
Link to merchant
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 Copyimport crafttweaker.api.entity.type.villager.Merchant;
Metodi
Link to metodi
Name: canRestock
Return Type: boolean
ZenScript Copy// Merchant.canRestock() as boolean
myMerchant.canRestock();
Name: getNotifyTradeSound
Return Type: SoundEvent
ZenScript Copy// Merchant.getNotifyTradeSound() as SoundEvent
myMerchant.getNotifyTradeSound();
Name: getOffers
Return Type: MerchantOffers
ZenScript Copy// Merchant.getOffers() as MerchantOffers
myMerchant.getOffers();
Name: getTradingPlayer
Return Type: Player?
ZenScript Copy// Merchant.getTradingPlayer() as Player?
myMerchant.getTradingPlayer();
Name: getVillagerXp
Return Type: int
ZenScript Copy// Merchant.getVillagerXp() as int
myMerchant.getVillagerXp();
Name: isClientSide
Return Type: boolean
ZenScript Copy// Merchant.isClientSide() as boolean
myMerchant.isClientSide();
Name: notifyTrade
ZenScript CopyMerchant.notifyTrade(offer as MerchantOffer)
Parametro | Tipo |
---|---|
Parametro offer | Tipo MerchantOffer |
Name: notifyTradeUpdated
ZenScript CopyMerchant.notifyTradeUpdated(stack as ItemStack)
Parametro | Tipo |
---|---|
Parametro stack | Tipo ItemStack |
Name: setTradingPlayer
ZenScript CopyMerchant.setTradingPlayer(player as Player?)
Parametro | Tipo |
---|---|
Parametro player | Tipo Player? |
Name: showProgressBar
Return Type: boolean
ZenScript Copy// Merchant.showProgressBar() as boolean
myMerchant.showProgressBar();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome canRestock | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome isClientSide | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome notifyTradeSound | Tipo SoundEvent | Ha Getter sì | Ha Setter no |
Nome offers | Tipo MerchantOffers | Ha Getter sì | Ha Setter no |
Nome showProgressBar | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome tradingPlayer | Tipo Merchant | Ha Getter sì | Ha Setter sì |
Nome villagerXp | Tipo int | Ha Getter sì | Ha Setter no |