Interface FabricCreativeInventoryScreen


public interface FabricCreativeInventoryScreen
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 List<net.minecraft.world.item.CreativeModeTab>
    Returns an ordered list containing the item groups on the requested page.
    default int
    getPage(net.minecraft.world.item.CreativeModeTab itemGroup)
    Returns the page index of the given item group.
    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 boolean
    Returns whether there are additional pages to show on top of the default vanilla pages.
    default boolean
    setSelectedItemGroup(net.minecraft.world.item.CreativeModeTab itemGroup)
    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.
    • getItemGroupsOnPage

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

      default int getPage(net.minecraft.world.item.CreativeModeTab itemGroup)
      Returns the page index of the given item group.

      Item groups appearing on every page always return the current page index.

      Parameters:
      itemGroup - the item group to get the page index for
      Returns:
      the page index of the item group
    • 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
    • getSelectedItemGroup

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

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