Merchant
Link to merchant
导入类
Link to 导入类
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;
使用方式
Link to 使用方式
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)
参数 | 类型 |
---|---|
参数 offer | 类型 MerchantOffer |
Name: notifyTradeUpdated
ZenScript CopyMerchant.notifyTradeUpdated(stack as ItemStack)
参数 | 类型 |
---|---|
参数 堆叠 | 类型 物品应用 |
Name: setTradingPlayer
ZenScript CopyMerchant.setTradingPlayer(player as Player?)
参数 | 类型 |
---|---|
参数 player | 类型 Player? |
Name: showProgressBar
Return Type: boolean
ZenScript Copy// Merchant.showProgressBar() as boolean
myMerchant.showProgressBar();
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 canRestock | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isClientSide | 类型 布尔值 | 可获得 true | 可设置 false |
名称 notifyTradeSound | 类型 SoundEvent | 可获得 true | 可设置 false |
名称 offers | 类型 MerchantOffers | 可获得 true | 可设置 false |
名称 showProgressBar | 类型 布尔值 | 可获得 true | 可设置 false |
名称 tradingPlayer | 类型 Merchant | 可获得 true | 可设置 true |
名称 villagerXp | 类型 int | 可获得 true | 可设置 false |