Class CreativeModeInventoryScreen.ItemPickerMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen.ItemPickerMenu
- Enclosing class:
CreativeModeInventoryScreen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AbstractContainerMenufinal NonNullList<ItemStack> The list of items in this container.Fields inherited from class net.minecraft.world.inventory.AbstractContainerMenu
CARRIED_SLOT_SIZE, containerId, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intbooleanReturnstrueif the player can "drag-spilt" items into this slot.booleanbooleancanTakeItemForPickAll(ItemStack stack, Slot slot) Called to determine if the current slot is valid for the stack merging (double-click) code.protected intgetRowIndexForScroll(float scrollOffs) protected floatgetScrollForRowIndex(int rowIndex) quickMoveStack(Player player, int index) Handle when the stack in slotindexis shift-clicked.voidscrollTo(float pos) Updates the gui slot's ItemStacks based on scroll position.voidsetCarried(ItemStack stack) booleanstillValid(Player player) Determines whether supplied player can use this containerprotected floatsubtractInputFromScroll(float scrollOffs, double input) Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canItemQuickReplace, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
items
The list of items in this container. -
inventoryMenu
-
-
Constructor Details
-
ItemPickerMenu
-
-
Method Details
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValidin classAbstractContainerMenu
-
calculateRowCount
protected int calculateRowCount() -
getRowIndexForScroll
protected int getRowIndexForScroll(float scrollOffs) -
getScrollForRowIndex
protected float getScrollForRowIndex(int rowIndex) -
subtractInputFromScroll
protected float subtractInputFromScroll(float scrollOffs, double input) -
scrollTo
public void scrollTo(float pos) Updates the gui slot's ItemStacks based on scroll position. -
canScroll
public boolean canScroll() -
quickMoveStack
Handle when the stack in slotindexis shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStackin classAbstractContainerMenu
-
canTakeItemForPickAll
Called to determine if the current slot is valid for the stack merging (double-click) code. The stack passed in is null for the initial slot that was double-clicked.- Overrides:
canTakeItemForPickAllin classAbstractContainerMenu
-
canDragTo
Returnstrueif the player can "drag-spilt" items into this slot. Returnstrueby default. Called to check if the slot can be added to a list of Slots to split the held ItemStack across.- Overrides:
canDragToin classAbstractContainerMenu
-
getCarried
- Overrides:
getCarriedin classAbstractContainerMenu
-
setCarried
- Overrides:
setCarriedin classAbstractContainerMenu
-