Class CreativeModeInventoryScreen.ItemPickerMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen.ItemPickerMenu
Enclosing class:
CreativeModeInventoryScreen

public static class CreativeModeInventoryScreen.ItemPickerMenu extends AbstractContainerMenu
  • Field Details

  • Constructor Details

    • ItemPickerMenu

      public ItemPickerMenu(Player pPlayer)
  • Method Details

    • stillValid

      public boolean stillValid(Player pPlayer)
      Determines whether supplied player can use this container
      Specified by:
      stillValid in class AbstractContainerMenu
    • 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

      public ItemStack quickMoveStack(Player pPlayer, int pIndex)
      Handle when the stack in slot index is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).
      Specified by:
      quickMoveStack in class AbstractContainerMenu
    • canTakeItemForPickAll

      public boolean canTakeItemForPickAll(ItemStack pStack, Slot pSlot)
      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 class AbstractContainerMenu
    • canDragTo

      public boolean canDragTo(Slot pSlot)
      Returns true if the player can "drag-spilt" items into this slot. Returns true 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 class AbstractContainerMenu
    • getCarried

      public ItemStack getCarried()
      Overrides:
      getCarried in class AbstractContainerMenu
    • setCarried

      public void setCarried(ItemStack pStack)
      Overrides:
      setCarried in class AbstractContainerMenu