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 AbstractContainerMenu
final 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 int
boolean
Returnstrue
if the player can "drag-spilt" items into this slot.boolean
boolean
canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.protected int
getRowIndexForScroll
(float pScrollOffs) protected float
getScrollForRowIndex
(int pRowIndex) quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.void
scrollTo
(float pPos) Updates the gui slot's ItemStacks based on scroll position.void
setCarried
(ItemStack pStack) boolean
stillValid
(Player pPlayer) Determines whether supplied player can use this containerprotected float
subtractInputFromScroll
(float pScrollOffs, double pInput) 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:
stillValid
in classAbstractContainerMenu
-
calculateRowCount
protected int calculateRowCount() -
getRowIndexForScroll
protected int getRowIndexForScroll(float pScrollOffs) -
getScrollForRowIndex
protected float getScrollForRowIndex(int pRowIndex) -
subtractInputFromScroll
protected float subtractInputFromScroll(float pScrollOffs, double pInput) -
scrollTo
public void scrollTo(float pPos) Updates the gui slot's ItemStacks based on scroll position. -
canScroll
public boolean canScroll() -
quickMoveStack
Handle when the stack in slotindex
is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStack
in 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:
canTakeItemForPickAll
in classAbstractContainerMenu
-
canDragTo
Returnstrue
if the player can "drag-spilt" items into this slot. Returnstrue
by default. Called to check if the slot can be added to a list of Slots to split the held ItemStack across.- Overrides:
canDragTo
in classAbstractContainerMenu
-
getCarried
- Overrides:
getCarried
in classAbstractContainerMenu
-
setCarried
- Overrides:
setCarried
in classAbstractContainerMenu
-