Class FTSInternal
java.lang.Object
net.mcexpanded.fancytabsections.FTSInternal
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 ClassesModifier and TypeClassDescriptionstatic classClient-Only class to handle sounds, preventing crashes from third parties who might call unsafe methods directly. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFTSInternal(net.neoforged.bus.api.IEventBus modEventBus, net.neoforged.fml.ModContainer modContainer) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyItems(net.minecraft.world.item.CreativeModeTab tab) Retrieves the items stored in the sections and applies them to the given CreativeModeTabstatic voidCollapses the requested tabstatic voidcomponentsBoundEvent(net.neoforged.neoforge.event.DefaultDataComponentsBoundEvent event) Used as a work-around for refreshing section items on world join, and /reloadstatic voidExpands the requested tabstatic intgetRowForSection(Section<?> section) static booleanisBannerRow(net.minecraft.resources.Identifier tab, int row) static booleanisCollapsed(Section<?> section) static voidrefreshAllItems(net.minecraft.core.RegistryAccess registryAccess) Refreshed all ConglomerateOfItems in registered sectionsstatic 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 voidtagsUpdatedEvent(net.neoforged.neoforge.event.TagsUpdatedEvent event) Triggered on world join, and /reload.static voidToggles the collapse requested section
-
Field Details
-
COLLAPSED
-
-
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
- Returns:
- The row number of the requested section, -1 if section was not found in any registered tab
- Since:
- 4.0
-
isCollapsed
- Returns:
- Whether the requested section is collapsed or not
- Since:
- 4.0
-
toggle
-
collapse
Collapses the requested tab- Since:
- 4.0
-
expand
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
-