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 pOffer) void
notifyTradeUpdated
(ItemStack pStack) Notifies the merchant of a possible merchant recipe being fulfilled or not.default void
openTradingScreen
(Player pPlayer, Component pDisplayName, int pLevel) void
overrideOffers
(MerchantOffers pOffers) void
overrideXp
(int pXp) void
setTradingPlayer
(Player pTradingPlayer) boolean
boolean
stillValid
(Player pPlayer)
-
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 pXp) -
showProgressBar
boolean showProgressBar() -
getNotifyTradeSound
SoundEvent getNotifyTradeSound() -
canRestock
default boolean canRestock() -
openTradingScreen
-
isClientSide
boolean isClientSide() -
stillValid
-