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, SLOT_SIZE, slots, SLOTS_PER_ROW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intbooleanReturnstrueif the player can "drag-spilt" items into this slot.booleanbooleancanTakeItemForPickAll(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.protected intgetRowIndexForScroll(float pScrollOffs) protected floatgetScrollForRowIndex(int pRowIndex) quickMoveStack(Player pPlayer, int pIndex) Handle when the stack in slotindexis shift-clicked.voidscrollTo(float pPos) Updates the gui slot's ItemStacks based on scroll position.voidsetCarried(ItemStack pStack) booleanstillValid(Player pPlayer) Determines whether supplied player can use this containerprotected floatsubtractInputFromScroll(float pScrollOffs, double pInput) Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, 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, setRemoteSlotUnsafe, setSelectedBundleItemIndex, 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 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 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
-