Package net.minecraft.world.item.trading
Interface Merchant
- All Known Implementing Classes:
AbstractVillager
,ClientSideMerchant
,Villager
,WanderingTrader
public interface Merchant
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
int
boolean
void
notifyTrade
(MerchantOffer offer) void
notifyTradeUpdated
(ItemStack stack) Notifies the merchant of a possible merchant recipe being fulfilled or not.default void
openTradingScreen
(Player player, Component displayName, int level) void
overrideOffers
(MerchantOffers offers) void
overrideXp
(int xp) void
setTradingPlayer
(Player tradingPlayer) 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 suggestedItemStack
is not empty. -
getVillagerXp
int getVillagerXp() -
overrideXp
void overrideXp(int xp) -
showProgressBar
boolean showProgressBar() -
getNotifyTradeSound
SoundEvent getNotifyTradeSound() -
canRestock
default boolean canRestock() -
openTradingScreen
-
isClientSide
boolean isClientSide()
-