Package net.minecraft.inventory
Class MerchantInventory
- java.lang.Object
-
- net.minecraft.inventory.MerchantInventory
-
- All Implemented Interfaces:
IClearable
,IInventory
public class MerchantInventory extends java.lang.Object implements IInventory
-
-
Field Summary
Fields Modifier and Type Field Description private MerchantOffer
activeOffer
private int
futureXp
private NonNullList<ItemStack>
itemStacks
private IMerchant
merchant
private int
selectionHint
-
Constructor Summary
Constructors Constructor Description MerchantInventory(IMerchant p_i50071_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearContent()
MerchantOffer
getActiveOffer()
int
getContainerSize()
int
getFutureXp()
ItemStack
getItem(int p_70301_1_)
boolean
isEmpty()
private boolean
isPaymentSlot(int p_70469_1_)
ItemStack
removeItem(int p_70298_1_, int p_70298_2_)
ItemStack
removeItemNoUpdate(int p_70304_1_)
void
setChanged()
void
setItem(int p_70299_1_, ItemStack p_70299_2_)
void
setSelectionHint(int p_70471_1_)
boolean
stillValid(PlayerEntity p_70300_1_)
void
updateSellItem()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.inventory.IInventory
canPlaceItem, countItem, getMaxStackSize, hasAnyOf, startOpen, stopOpen
-
-
-
-
Field Detail
-
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 Detail
-
MerchantInventory
public MerchantInventory(IMerchant p_i50071_1_)
-
-
Method Detail
-
getContainerSize
public int getContainerSize()
- Specified by:
getContainerSize
in interfaceIInventory
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceIInventory
-
getItem
public ItemStack getItem(int p_70301_1_)
- Specified by:
getItem
in interfaceIInventory
-
removeItem
public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
- Specified by:
removeItem
in interfaceIInventory
-
isPaymentSlot
private boolean isPaymentSlot(int p_70469_1_)
-
removeItemNoUpdate
public ItemStack removeItemNoUpdate(int p_70304_1_)
- Specified by:
removeItemNoUpdate
in interfaceIInventory
-
setItem
public void setItem(int p_70299_1_, ItemStack p_70299_2_)
- Specified by:
setItem
in interfaceIInventory
-
stillValid
public boolean stillValid(PlayerEntity p_70300_1_)
- Specified by:
stillValid
in interfaceIInventory
-
setChanged
public void setChanged()
- Specified by:
setChanged
in interfaceIInventory
-
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 interfaceIClearable
-
getFutureXp
public int getFutureXp()
-
-