Class MerchantContainer

java.lang.Object
net.minecraft.world.inventory.MerchantContainer
All Implemented Interfaces:
Clearable, Container

public class MerchantContainer extends Object implements Container
  • Field Details

    • merchant

      private final Merchant merchant
    • itemStacks

      private final NonNullList<ItemStack> itemStacks
    • activeOffer

      @Nullable private MerchantOffer activeOffer
    • selectionHint

      private int selectionHint
    • futureXp

      private int futureXp
  • Constructor Details

    • MerchantContainer

      public MerchantContainer(Merchant p_40003_)
  • Method Details

    • getContainerSize

      public int getContainerSize()
      Specified by:
      getContainerSize in interface Container
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Container
    • getItem

      public ItemStack getItem(int p_40008_)
      Specified by:
      getItem in interface Container
    • removeItem

      public ItemStack removeItem(int p_40010_, int p_40011_)
      Specified by:
      removeItem in interface Container
    • isPaymentSlot

      private boolean isPaymentSlot(int p_40023_)
    • removeItemNoUpdate

      public ItemStack removeItemNoUpdate(int p_40018_)
      Specified by:
      removeItemNoUpdate in interface Container
    • setItem

      public void setItem(int p_40013_, ItemStack p_40014_)
      Specified by:
      setItem in interface Container
    • stillValid

      public boolean stillValid(Player p_40016_)
      Specified by:
      stillValid in interface Container
    • setChanged

      public void setChanged()
      Specified by:
      setChanged in interface Container
    • updateSellItem

      public void updateSellItem()
    • getActiveOffer

      @Nullable public MerchantOffer getActiveOffer()
    • setSelectionHint

      public void setSelectionHint(int p_40021_)
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface Clearable
    • getFutureXp

      public int getFutureXp()