Class FancyTabSections

java.lang.Object
net.mcexpanded.fancytabsections.FancyTabSections

public class FancyTabSections extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<net.minecraft.resources.Identifier, List<net.minecraft.world.item.ItemStack>>
    Deprecated, for removal: This API element is subject to removal in a future version. 
    static final String
     
    static final Map<net.minecraft.resources.Identifier, List<Section<?>>>
     
    static final Map<net.minecraft.resources.Identifier, List<Section>>
    Deprecated, for removal: This API element is subject to removal in a future version. 
  • Constructor Summary

    Constructors
    Constructor
    Description
    An example of an implementation can be found on FTSExampleMod.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addSection(net.minecraft.resources.Identifier tab, Section section)
    Deprecated, for removal: This API element is subject to removal in a future version. 
    static void
    addSection(net.minecraft.resources.Identifier tab, Section section)
    Adds a new Section to the given CreativeModeTab Identifier
    static Section<?>
    getSection(net.minecraft.resources.Identifier id)
     
    static List<Section<?>>
    getSections(net.minecraft.world.item.CreativeModeTab tab)
     
    static Supplier<net.minecraft.world.item.CreativeModeTab>
    registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.Identifier Identifier, Supplier<net.minecraft.world.item.ItemStack> displayItem)
    Registers a CreativeModeTab for with the given Identifier.
    static Supplier<net.minecraft.world.item.CreativeModeTab>
    registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.Identifier Identifier, net.minecraft.world.item.Item displayItem)
    Registers a CreativeModeTab for with the given Identifier.
    static Supplier<net.minecraft.world.item.CreativeModeTab>
    registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.Identifier Identifier, net.neoforged.neoforge.registries.DeferredItem<net.minecraft.world.item.Item> displayItem)
    Registers a CreativeModeTab for with the given Identifier.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MOD_ID

      public static final String MOD_ID
      See Also:
    • REGISTERED_TABS

      public static final Map<net.minecraft.resources.Identifier, List<Section<?>>> REGISTERED_TABS
    • SECTIONS_MAP

      @Deprecated(forRemoval=true) public static final Map<net.minecraft.resources.Identifier, List<Section>> SECTIONS_MAP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Kept for backwards compatibility
      Since:
      1.0
    • ITEMS_MAP

      @Deprecated(forRemoval=true) public static final Map<net.minecraft.resources.Identifier, List<net.minecraft.world.item.ItemStack>> ITEMS_MAP
      Deprecated, for removal: This API element is subject to removal in a future version.
      Kept for backwards compatibility
      Since:
      1.0
  • Constructor Details

    • FancyTabSections

      public FancyTabSections()
      An example of an implementation can be found on FTSExampleMod. Check the wiki on GitHub or directly contact me on discord for any questions that the wiki could not answer.
  • Method Details

    • addSection

      public static void addSection(net.minecraft.resources.Identifier tab, Section section)
      Adds a new Section to the given CreativeModeTab Identifier
      Since:
      4.0
    • getSections

      public static List<Section<?>> getSections(net.minecraft.world.item.CreativeModeTab tab)
      Returns:
      The list of sections registered, or an empty list if none are found for the requested CreativeModeTab
      Since:
      4.0
    • registerCreativeModeTab

      public static Supplier<net.minecraft.world.item.CreativeModeTab> registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.Identifier Identifier, Supplier<net.minecraft.world.item.ItemStack> displayItem)
      Registers a CreativeModeTab for with the given Identifier. The title of the CreativeModeTab will be set as `itemGroup.[namespace].[path]`
      Parameters:
      Identifier - The Identifier for the Tab
      displayItem - The ItemStack to be displayed on the "icon" of the tab
      Since:
      5.0
    • registerCreativeModeTab

      public static Supplier<net.minecraft.world.item.CreativeModeTab> registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.Identifier Identifier, net.minecraft.world.item.Item displayItem)
      Registers a CreativeModeTab for with the given Identifier. The title of the CreativeModeTab will be set as `itemGroup.[namespace].[path]`
      Parameters:
      Identifier - The Identifier for the Tab
      displayItem - The Item to be displayed on the "icon" of the tab
      Since:
      5.0
    • registerCreativeModeTab

      public static Supplier<net.minecraft.world.item.CreativeModeTab> registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.Identifier Identifier, net.neoforged.neoforge.registries.DeferredItem<net.minecraft.world.item.Item> displayItem)
      Registers a CreativeModeTab for with the given Identifier. The title of the CreativeModeTab will be set as `itemGroup.[namespace].[path]`
      Parameters:
      Identifier - The Identifier for the Tab
      displayItem - The Item to be displayed on the "icon" of the tab
      Since:
      5.0
    • getSection

      public static Section<?> getSection(net.minecraft.resources.Identifier id)
      Returns:
      A registered section, or null if none were found
      Since:
      4.0
    • addSection

      @Deprecated(forRemoval=true) public static void addSection(net.minecraft.resources.Identifier tab, Section section)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Kept for backwards compatibility, use the new Section method instead
      Since:
      1.0