Class MerchantInventory

java.lang.Object
net.minecraft.inventory.MerchantInventory
All Implemented Interfaces:
IClearable, IInventory

public class MerchantInventory extends Object implements IInventory
  • Field Details

    • merchant

      private final IMerchant merchant
    • itemStacks

      private final NonNullList<ItemStack> itemStacks
    • activeOffer

      @Nullable private MerchantOffer activeOffer
    • selectionHint

      private int selectionHint
    • futureXp

      private int futureXp
  • Constructor Details

    • MerchantInventory

      public MerchantInventory(IMerchant p_i50071_1_)
  • Method Details

    • getContainerSize

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

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

      public ItemStack getItem(int p_70301_1_)
      Specified by:
      getItem in interface IInventory
    • removeItem

      public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
      Specified by:
      removeItem in interface IInventory
    • isPaymentSlot

      private boolean isPaymentSlot(int p_70469_1_)
    • removeItemNoUpdate

      public ItemStack removeItemNoUpdate(int p_70304_1_)
      Specified by:
      removeItemNoUpdate in interface IInventory
    • setItem

      public void setItem(int p_70299_1_, ItemStack p_70299_2_)
      Specified by:
      setItem in interface IInventory
    • stillValid

      public boolean stillValid(PlayerEntity p_70300_1_)
      Specified by:
      stillValid in interface IInventory
    • setChanged

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

      public void updateSellItem()
    • getActiveOffer

      @Nullable public MerchantOffer getActiveOffer()
    • setSelectionHint

      public void setSelectionHint(int p_70471_1_)
    • clearContent

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

      public int getFutureXp()