Package net.minecraft.world.item.trading
Interface Merchant
- All Known Implementing Classes:
AbstractVillager,ClientSideMerchant,Villager,WanderingTrader
public interface Merchant
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanintbooleanvoidnotifyTrade(MerchantOffer pOffer) voidnotifyTradeUpdated(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.default voidopenTradingScreen(Player pPlayer, Component pDisplayName, int pLevel) voidoverrideOffers(MerchantOffers pOffers) voidoverrideXp(int pXp) voidsetTradingPlayer(Player pTradingPlayer) boolean
-
Method Details
-
setTradingPlayer
-
getTradingPlayer
-
getOffers
MerchantOffers getOffers() -
overrideOffers
-
notifyTrade
-
notifyTradeUpdated
Notifies the merchant of a possible merchant recipe being fulfilled or not. Usually, this is just a sound byte being played depending on whether the suggestedItemStackis not empty. -
getVillagerXp
int getVillagerXp() -
overrideXp
void overrideXp(int pXp) -
showProgressBar
boolean showProgressBar() -
getNotifyTradeSound
SoundEvent getNotifyTradeSound() -
canRestock
default boolean canRestock() -
openTradingScreen
-
isClientSide
boolean isClientSide()
-