Package net.mcexpanded.fancytabsections
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 voidExpands the requested tabstatic intgetRowForSection(Section<?> section) static booleanisBannerRow(net.minecraft.resources.ResourceLocation 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.ResourceLocation rl, Supplier<net.minecraft.world.item.ItemStack> sup) static voidtagsUpdatedEvent(net.neoforged.neoforge.event.TagsUpdatedEvent event) Triggered on world join, and /reload Used as a work-around for full RegistryAccess as ResourceListeners do not have access to tagsstatic voidToggles the collapse requested section
-
Field Details
-
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 as a work-around for full RegistryAccess as ResourceListeners do not have access to tags- 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
Toggles the collapse requested section- Since:
- 4.0
-
collapse
Collapses the requested tab- Since:
- 4.0
-
expand
Expands the requested tab- Since:
- 4.0
-
isBannerRow
public static boolean isBannerRow(net.minecraft.resources.ResourceLocation tab, int row) - Returns:
- Whether the given row is the first row of a section, referred to as the banner
- Since:
- 4.0
-
registerTab
-