Interface FabricCreativeModeInventoryScreen


public interface FabricCreativeModeInventoryScreen
Fabric provided extensions to CreativeModeInventoryScreen. This interface is automatically implemented on all creative inventory screens via Mixin and interface injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Returns the index of the current page.
    default int
    getPage(net.minecraft.world.item.CreativeModeTab creativeModeTab)
    Returns the page index of the given creative mode tab.
    default int
    Returns the total number of pages.
    default net.minecraft.world.item.CreativeModeTab
    Returns the CreativeModeTab that is associated with the currently selected tab.
    default List<net.minecraft.world.item.CreativeModeTab>
    getTabsOnPage(int page)
    Returns an ordered list containing the creative mode tabs on the requested page.
    default boolean
    Returns whether there are additional pages to show on top of the default vanilla pages.
    default boolean
    setSelectedTab(net.minecraft.world.item.CreativeModeTab creativeModeTab)
    Sets the currently selected tab to the given CreativeModeTab.
    default boolean
    Switches to the next page if it exists.
    default boolean
    switchToPage(int page)
    Switches to the page with the given index if it exists.
    default boolean
    Switches to the previous page if it exists.
  • Method Details

    • switchToPage

      default boolean switchToPage(int page)
      Switches to the page with the given index if it exists.
      Parameters:
      page - the index of the page to switch to
      Returns:
      Returns true when the page was changed
    • switchToNextPage

      default boolean switchToNextPage()
      Switches to the next page if it exists.
      Returns:
      Returns true when the page was changed
    • switchToPreviousPage

      default boolean switchToPreviousPage()
      Switches to the previous page if it exists.
      Returns:
      Returns true when the page was changed
    • getCurrentPage

      default int getCurrentPage()
      Returns the index of the current page.
    • getPageCount

      default int getPageCount()
      Returns the total number of pages.
    • getTabsOnPage

      default List<net.minecraft.world.item.CreativeModeTab> getTabsOnPage(int page)
      Returns an ordered list containing the creative mode tabs on the requested page.
    • getPage

      default int getPage(net.minecraft.world.item.CreativeModeTab creativeModeTab)
      Returns the page index of the given creative mode tab.

      Creative Mode Tabs appearing on every page always return the current page index.

      Parameters:
      creativeModeTab - the creative mode tab to get the page index for
      Returns:
      the page index of the creative mode tab
    • hasAdditionalPages

      default boolean hasAdditionalPages()
      Returns whether there are additional pages to show on top of the default vanilla pages.
      Returns:
      true if there are additional pages
    • getSelectedTab

      default net.minecraft.world.item.CreativeModeTab getSelectedTab()
      Returns the CreativeModeTab that is associated with the currently selected tab.
      Returns:
      the currently selected CreativeModeTab
    • setSelectedTab

      default boolean setSelectedTab(net.minecraft.world.item.CreativeModeTab creativeModeTab)
      Sets the currently selected tab to the given CreativeModeTab.
      Parameters:
      creativeModeTab - the CreativeModeTab to select
      Returns:
      true if the tab was successfully selected