Class FTSInternal

java.lang.Object
net.mcexpanded.fancytabsections.FTSInternal

@Internal public class FTSInternal extends Object
Methods in this class might change name or be removed. It is highly recommended you do not call them. You should only interact with FancyTabSections by using FancyTabSections
Since:
4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Client-Only class to handle sounds, preventing crashes from third parties who might call unsafe methods directly.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Set<Section<?>>
    Contains a set of all collapsed sections
  • Constructor Summary

    Constructors
    Constructor
    Description
    FTSInternal(net.neoforged.bus.api.IEventBus modEventBus, net.neoforged.fml.ModContainer modContainer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    applyItems(net.minecraft.world.item.CreativeModeTab tab)
    Retrieves the items stored in the sections and applies them to the given CreativeModeTab
    static void
    collapse(Section<?> section, boolean playSound)
    Collapses the requested tab
    static void
    componentsBoundEvent(net.neoforged.neoforge.event.DefaultDataComponentsBoundEvent event)
    Used as a work-around for refreshing section items on world join, and /reload
    static void
    expand(Section<?> section, boolean playSound)
    Expands the requested tab
    static int
     
    static boolean
    isBannerRow(net.minecraft.resources.Identifier tab, int row)
     
    static boolean
    isCollapsed(Section<?> section)
     
    static void
    refreshAllItems(net.minecraft.core.RegistryAccess registryAccess)
    Refreshed all ConglomerateOfItems in registered sections
    static Supplier<net.minecraft.world.item.CreativeModeTab>
    registerTab(net.neoforged.bus.api.IEventBus bus, net.minecraft.resources.Identifier rl, Supplier<net.minecraft.world.item.ItemStack> sup)
     
    static void
    tagsUpdatedEvent(net.neoforged.neoforge.event.TagsUpdatedEvent event)
    Triggered on world join, and /reload.
    static void
    toggle(Section<?> section)
    Toggles the collapse requested section

    Methods inherited from class Object

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

    • COLLAPSED

      public static final Set<Section<?>> COLLAPSED
      Contains a set of all collapsed sections
      Since:
      4.0
  • Constructor Details

    • FTSInternal

      public FTSInternal(net.neoforged.bus.api.IEventBus modEventBus, net.neoforged.fml.ModContainer modContainer)
  • Method Details

    • applyItems

      public static void applyItems(net.minecraft.world.item.CreativeModeTab tab)
      Retrieves the items stored in the sections and applies them to the given CreativeModeTab
      Since:
      4.0
    • tagsUpdatedEvent

      public static void tagsUpdatedEvent(net.neoforged.neoforge.event.TagsUpdatedEvent event)
      Triggered on world join, and /reload. Used to store full RegistryAccess, considering ResourceListeners do not have tags bound
      Since:
      4.0
    • componentsBoundEvent

      public static void componentsBoundEvent(net.neoforged.neoforge.event.DefaultDataComponentsBoundEvent event)
      Used as a work-around for refreshing section items on world join, and /reload
      Since:
      4.0
    • refreshAllItems

      public static void refreshAllItems(net.minecraft.core.RegistryAccess registryAccess)
      Refreshed all ConglomerateOfItems in registered sections
      Since:
      4.0
    • getRowForSection

      public static int getRowForSection(Section<?> section)
      Returns:
      The row number of the requested section, -1 if section was not found in any registered tab
      Since:
      4.0
    • isCollapsed

      public static boolean isCollapsed(Section<?> section)
      Returns:
      Whether the requested section is collapsed or not
      Since:
      4.0
    • toggle

      public static void toggle(Section<?> section)
      Toggles the collapse requested section
      Since:
      4.0
    • collapse

      public static void collapse(Section<?> section, boolean playSound)
      Collapses the requested tab
      Since:
      4.0
    • expand

      public static void expand(Section<?> section, boolean playSound)
      Expands the requested tab
      Since:
      4.0
    • isBannerRow

      public static boolean isBannerRow(net.minecraft.resources.Identifier tab, int row)
      Returns:
      Whether the given row is the first row of a section, referred to as the banner
      Since:
      4.0
    • registerTab

      public static Supplier<net.minecraft.world.item.CreativeModeTab> registerTab(net.neoforged.bus.api.IEventBus bus, net.minecraft.resources.Identifier rl, Supplier<net.minecraft.world.item.ItemStack> sup)