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 MerchantOfferactiveOfferprivate intfutureXpprivate NonNullList<ItemStack>itemStacksprivate IMerchantmerchantprivate intselectionHint
-
Constructor Summary
Constructors Constructor Description MerchantInventory(IMerchant p_i50071_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearContent()MerchantOffergetActiveOffer()intgetContainerSize()intgetFutureXp()ItemStackgetItem(int p_70301_1_)booleanisEmpty()private booleanisPaymentSlot(int p_70469_1_)ItemStackremoveItem(int p_70298_1_, int p_70298_2_)ItemStackremoveItemNoUpdate(int p_70304_1_)voidsetChanged()voidsetItem(int p_70299_1_, ItemStack p_70299_2_)voidsetSelectionHint(int p_70471_1_)booleanstillValid(PlayerEntity p_70300_1_)voidupdateSellItem()-
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:
getContainerSizein interfaceIInventory
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceIInventory
-
getItem
public ItemStack getItem(int p_70301_1_)
- Specified by:
getItemin interfaceIInventory
-
removeItem
public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
- Specified by:
removeItemin interfaceIInventory
-
isPaymentSlot
private boolean isPaymentSlot(int p_70469_1_)
-
removeItemNoUpdate
public ItemStack removeItemNoUpdate(int p_70304_1_)
- Specified by:
removeItemNoUpdatein interfaceIInventory
-
setItem
public void setItem(int p_70299_1_, ItemStack p_70299_2_)- Specified by:
setItemin interfaceIInventory
-
stillValid
public boolean stillValid(PlayerEntity p_70300_1_)
- Specified by:
stillValidin interfaceIInventory
-
setChanged
public void setChanged()
- Specified by:
setChangedin interfaceIInventory
-
updateSellItem
public void updateSellItem()
-
getActiveOffer
@Nullable public MerchantOffer getActiveOffer()
-
setSelectionHint
public void setSelectionHint(int p_70471_1_)
-
clearContent
public void clearContent()
- Specified by:
clearContentin interfaceIClearable
-
getFutureXp
public int getFutureXp()
-
-