Package net.minecraft.world.inventory
Class MerchantContainer
java.lang.Object
net.minecraft.world.inventory.MerchantContainer
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.Container
Container.ContainerIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MerchantOffer
private int
private final NonNullList
<ItemStack> private final Merchant
private int
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
int
getItem
(int pIndex) Returns the stack in the given slot.boolean
isEmpty()
private boolean
isPaymentSlot
(int pSlot) if par1 slot has changed, does resetRecipeAndSlots need to be called?removeItem
(int pIndex, int pCount) Removes up to a specified number of items from an inventory slot and returns them in a new stack.removeItemNoUpdate
(int pIndex) Removes a stack from the given slot and returns it.void
void
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).void
setSelectionHint
(int pCurrentRecipeIndex) boolean
stillValid
(Player pPlayer) Don't rename this method to canInteractWith due to conflicts with Containervoid
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, iterator, startOpen, stopOpen
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
merchant
-
itemStacks
-
activeOffer
-
selectionHint
private int selectionHint -
futureXp
private int futureXp
-
-
Constructor Details
-
MerchantContainer
-
-
Method Details
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSize
in interfaceContainer
-
isEmpty
public boolean isEmpty() -
getItem
Returns the stack in the given slot. -
removeItem
Removes up to a specified number of items from an inventory slot and returns them in a new stack.- Specified by:
removeItem
in interfaceContainer
-
isPaymentSlot
private boolean isPaymentSlot(int pSlot) if par1 slot has changed, does resetRecipeAndSlots need to be called? -
removeItemNoUpdate
Removes a stack from the given slot and returns it.- Specified by:
removeItemNoUpdate
in interfaceContainer
-
setItem
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). -
stillValid
Don't rename this method to canInteractWith due to conflicts with Container- Specified by:
stillValid
in interfaceContainer
-
setChanged
public void setChanged()- Specified by:
setChanged
in interfaceContainer
-
updateSellItem
public void updateSellItem() -
getActiveOffer
-
setSelectionHint
public void setSelectionHint(int pCurrentRecipeIndex) -
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceClearable
-
getFutureXp
public int getFutureXp()
-