Class MerchantContainer
java.lang.Object
net.minecraft.world.inventory.MerchantContainer
- All Implemented Interfaces:
Iterable<ItemStack>, Clearable, Container, SlotProvider, ContainerExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface Container
Container.ContainerIterator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable MerchantOfferprivate intprivate final NonNullList<ItemStack> private final Merchantprivate intFields inherited from interface Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid@Nullable MerchantOfferintintgetItem(int slot) booleanisEmpty()private booleanisPaymentSlot(int slot) removeItem(int slot, int count) removeItemNoUpdate(int slot) voidvoidvoidsetSelectionHint(int selectionHint) booleanstillValid(Player player) voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Container
canPlaceItem, canTakeItem, countItem, getEntitiesWithContainerOpen, getMaxStackSize, getMaxStackSize, getSlot, hasAnyMatching, hasAnyOf, iterator, startOpen, stopOpenMethods inherited from interface ContainerExtension
onTransfer, setItemMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface SlotProvider
getSlotsFromRange
-
Field Details
-
merchant
-
itemStacks
-
activeOffer
-
selectionHint
private int selectionHint -
futureXp
private int futureXp
-
-
Constructor Details
-
MerchantContainer
-
-
Method Details
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfaceContainer
-
isEmpty
-
getItem
-
removeItem
- Specified by:
removeItemin interfaceContainer
-
isPaymentSlot
private boolean isPaymentSlot(int slot) -
removeItemNoUpdate
- Specified by:
removeItemNoUpdatein interfaceContainer
-
setItem
-
stillValid
- Specified by:
stillValidin interfaceContainer
-
setChanged
public void setChanged()- Specified by:
setChangedin interfaceContainer
-
updateSellItem
public void updateSellItem() -
getActiveOffer
-
setSelectionHint
public void setSelectionHint(int selectionHint) -
clearContent
public void clearContent()- Specified by:
clearContentin interfaceClearable
-
getFutureXp
public int getFutureXp()
-