Package net.mcexpanded.fancytabsections
Class FancyTabSections
java.lang.Object
net.mcexpanded.fancytabsections.FancyTabSections
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.static final StringDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionAn example of an implementation can be found on FTSExampleMod. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddSection(net.minecraft.resources.ResourceLocation tab, Section section) Deprecated, for removal: This API element is subject to removal in a future version.static voidaddSection(net.minecraft.resources.ResourceLocation tab, Section section) Adds a new Section to the given CreativeModeTab Identifierstatic Section<?> getSection(net.minecraft.resources.ResourceLocation id) getSections(net.minecraft.world.item.CreativeModeTab tab) static Supplier<net.minecraft.world.item.CreativeModeTab> registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.ResourceLocation resourceLocation, Supplier<net.minecraft.world.item.ItemStack> displayItem) Registers a CreativeModeTab for with the given ResourceLocation.static Supplier<net.minecraft.world.item.CreativeModeTab> registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.ResourceLocation resourceLocation, net.minecraft.world.item.Item displayItem) Registers a CreativeModeTab for with the given ResourceLocation.static Supplier<net.minecraft.world.item.CreativeModeTab> registerCreativeModeTab(net.neoforged.bus.api.IEventBus eventBus, net.minecraft.resources.ResourceLocation resourceLocation, net.neoforged.neoforge.registries.DeferredItem<net.minecraft.world.item.Item> displayItem) Registers a CreativeModeTab for with the given ResourceLocation.
-
Field Details
-
MOD_ID
- See Also:
-
REGISTERED_TABS
-
SECTIONS_MAP
@Deprecated(forRemoval=true) public static final Map<net.minecraft.resources.ResourceLocation,List<Section>> SECTIONS_MAPDeprecated, 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.ResourceLocation,List<net.minecraft.world.item.ItemStack>> ITEMS_MAPDeprecated, 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
Adds a new Section to the given CreativeModeTab Identifier- Since:
- 4.0
-
getSections
- 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.ResourceLocation resourceLocation, Supplier<net.minecraft.world.item.ItemStack> displayItem) Registers a CreativeModeTab for with the given ResourceLocation. The title of the CreativeModeTab will be set as `itemGroup.[namespace].[path]`- Parameters:
resourceLocation- The ResourceLocation for the TabdisplayItem- 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.ResourceLocation resourceLocation, net.minecraft.world.item.Item displayItem) Registers a CreativeModeTab for with the given ResourceLocation. The title of the CreativeModeTab will be set as `itemGroup.[namespace].[path]`- Parameters:
resourceLocation- The ResourceLocation for the TabdisplayItem- 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.ResourceLocation resourceLocation, net.neoforged.neoforge.registries.DeferredItem<net.minecraft.world.item.Item> displayItem) Registers a CreativeModeTab for with the given ResourceLocation. The title of the CreativeModeTab will be set as `itemGroup.[namespace].[path]`- Parameters:
resourceLocation- The ResourceLocation for the TabdisplayItem- The Item to be displayed on the "icon" of the tab- Since:
- 5.0
-
getSection
- Returns:
- A registered section, or null if none were found
- Since:
- 4.0
-
addSection
@Deprecated(forRemoval=true) public static void addSection(net.minecraft.resources.ResourceLocation tab, Section section) Deprecated, for removal: This API element is subject to removal in a future version.Kept for backwards compatibility, use the newSectionmethod instead- Since:
- 1.0
-