Class MerchantContainer

java.lang.Object
net.minecraft.inventory.container.Container
net.minecraft.inventory.container.MerchantContainer

public class MerchantContainer extends Container
  • Field Details

    • trader

      private final IMerchant trader
    • tradeContainer

      private final MerchantInventory tradeContainer
    • merchantLevel

      private int merchantLevel
    • showProgressBar

      private boolean showProgressBar
    • canRestock

      private boolean canRestock
  • Constructor Details

    • MerchantContainer

      public MerchantContainer(int p_i50068_1_, PlayerInventory p_i50068_2_)
    • MerchantContainer

      public MerchantContainer(int p_i50069_1_, PlayerInventory p_i50069_2_, IMerchant p_i50069_3_)
  • Method Details

    • setShowProgressBar

      public void setShowProgressBar(boolean p_217045_1_)
    • slotsChanged

      public void slotsChanged(IInventory p_75130_1_)
      Overrides:
      slotsChanged in class Container
    • setSelectionHint

      public void setSelectionHint(int p_75175_1_)
    • stillValid

      public boolean stillValid(PlayerEntity p_75145_1_)
      Specified by:
      stillValid in class Container
    • getTraderXp

      public int getTraderXp()
    • getFutureTraderXp

      public int getFutureTraderXp()
    • setXp

      public void setXp(int p_217052_1_)
    • getTraderLevel

      public int getTraderLevel()
    • setMerchantLevel

      public void setMerchantLevel(int p_217043_1_)
    • setCanRestock

      public void setCanRestock(boolean p_223431_1_)
    • canRestock

      public boolean canRestock()
    • canTakeItemForPickAll

      public boolean canTakeItemForPickAll(ItemStack p_94530_1_, Slot p_94530_2_)
      Overrides:
      canTakeItemForPickAll in class Container
    • quickMoveStack

      public ItemStack quickMoveStack(PlayerEntity p_82846_1_, int p_82846_2_)
      Overrides:
      quickMoveStack in class Container
    • playTradeSound

      private void playTradeSound()
    • removed

      public void removed(PlayerEntity p_75134_1_)
      Overrides:
      removed in class Container
    • tryMoveItems

      public void tryMoveItems(int p_217046_1_)
    • moveFromInventoryToPaymentSlot

      private void moveFromInventoryToPaymentSlot(int p_217053_1_, ItemStack p_217053_2_)
    • isSameItem

      private boolean isSameItem(ItemStack p_217050_1_, ItemStack p_217050_2_)
    • setOffers

      public void setOffers(MerchantOffers p_217044_1_)
    • getOffers

      public MerchantOffers getOffers()
    • showProgressBar

      public boolean showProgressBar()