Interface Merchant

All Known Implementing Classes:
AbstractVillager, ClientSideMerchant, Villager, WanderingTrader

public interface Merchant
  • Method Details

    • setTradingPlayer

      void setTradingPlayer(@Nullable Player pTradingPlayer)
    • getTradingPlayer

      @Nullable Player getTradingPlayer()
    • getOffers

      MerchantOffers getOffers()
    • overrideOffers

      void overrideOffers(MerchantOffers pOffers)
    • notifyTrade

      void notifyTrade(MerchantOffer pOffer)
    • notifyTradeUpdated

      void notifyTradeUpdated(ItemStack pStack)
      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 suggested ItemStack is not empty.
    • getVillagerXp

      int getVillagerXp()
    • overrideXp

      void overrideXp(int pXp)
    • showProgressBar

      boolean showProgressBar()
    • getNotifyTradeSound

      SoundEvent getNotifyTradeSound()
    • canRestock

      default boolean canRestock()
    • openTradingScreen

      default void openTradingScreen(Player pPlayer, Component pDisplayName, int pLevel)
    • isClientSide

      boolean isClientSide()