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.entity.type.villager.Merchant;

Name: canRestock

Return Type: boolean

ZenScript
Copy
// Merchant.canRestock() as boolean

myMerchant.canRestock();

Link to getNotifyTradeSound

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();

Link to getTradingPlayer

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

Return Type: void

ZenScript
Copy
Merchant.notifyTrade(offer as MerchantOffer) as void
参数类型描述
参数
offer
类型
MerchantOffer
描述
No Description Provided

Link to notifyTradeUpdated

Name: notifyTradeUpdated

Return Type: void

ZenScript
Copy
Merchant.notifyTradeUpdated(stack as ItemStack) as void
参数类型描述
参数
堆叠
类型
物品应用
描述
No Description Provided

Link to openTradingScreen

Name: openTradingScreen

Return Type: void

ZenScript
Copy
Merchant.openTradingScreen(player as Player, displayName as Component, level as int) as void
参数类型描述
参数
player
类型
Player
描述
No Description Provided
参数
displayName
类型
Component
描述
No Description Provided
参数
level
类型
int
描述
No Description Provided

Link to setTradingPlayer

Name: setTradingPlayer

Return Type: void

ZenScript
Copy
Merchant.setTradingPlayer(player as Player) as void
参数类型描述
参数
player
类型
Player
描述
No Description Provided

Name: showProgressBar

Return Type: boolean

ZenScript
Copy
// Merchant.showProgressBar() as boolean

myMerchant.showProgressBar();
名称类型可获得可设置描述
名称
canRestock
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
isClientSide
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
notifyTradeSound
类型
SoundEvent
可获得
true
可设置
false
描述
No Description Provided
名称
offers
类型
MerchantOffers
可获得
true
可设置
false
描述
No Description Provided
名称
showProgressBar
类型
布尔值
可获得
true
可设置
false
描述
No Description Provided
名称
tradingPlayer
类型
Merchant
可获得
true
可设置
true
描述
No Description Provided
名称
villagerXp
类型
int
可获得
true
可设置
false
描述
No Description Provided