Interface Merchant

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

public interface Merchant
  • Method Details

    • setTradingPlayer

      void setTradingPlayer(@Nullable Player tradingPlayer)
    • getTradingPlayer

      @Nullable Player getTradingPlayer()
    • getOffers

      MerchantOffers getOffers()
    • overrideOffers

      void overrideOffers(MerchantOffers offers)
    • notifyTrade

      void notifyTrade(MerchantOffer offer)
    • notifyTradeUpdated

      void notifyTradeUpdated(ItemStack stack)
      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 xp)
    • showProgressBar

      boolean showProgressBar()
    • getNotifyTradeSound

      SoundEvent getNotifyTradeSound()
    • canRestock

      default boolean canRestock()
    • openTradingScreen

      default void openTradingScreen(Player player, Component displayName, int level)
    • isClientSide

      boolean isClientSide()