Interface Section<T extends Section<T>>
- All Known Subinterfaces:
Section
- All Known Implementing Classes:
AbstractSectionWithTitle,SectionAnimatedTextured,SectionColored,SectionColored,SectionTextured,SectionTextured
public interface Section<T extends Section<T>>
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault Tdefault Tdefault Tdefault Tadd(net.minecraft.world.item.Item item) ConglomerateOfItems redirect helper methodsdefault Tadd(net.minecraft.world.item.ItemStack stack) default Tadd(net.minecraft.world.level.ItemLike itemLike) default Tadd(net.neoforged.neoforge.registries.DeferredItem<net.minecraft.world.item.Item> deferredItem) default Tadd(net.neoforged.neoforge.registries.DeferredRegister.Items deferredRegister) default TaddItemTag(net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag) default booleandefault net.minecraft.world.item.ItemStackicon()net.minecraft.resources.ResourceLocationid()items()default voidonReload(net.minecraft.core.RegistryAccess registryAccess) Runs everytime the section items are reloadedvoidrender(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY) default voidrenderToggle(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, net.minecraft.client.gui.GuiGraphics graphics, Section<?> section, int x, int y, int w, int bannerWidth, int mouseX, int mouseY, boolean isHoveringAny) Renders the toggle button on the right side of the banner of a given section.default net.minecraft.network.chat.Componenttitle()
-
Method Details
-
id
net.minecraft.resources.ResourceLocation id() -
collapsible
default boolean collapsible() -
title
default net.minecraft.network.chat.Component title()- Returns:
- A display title for this section, or null if it doesn't have one. Lets features that need a human-readable label (e.g. a jump list) work with any Section implementation, without needing to know its concrete type.
- Since:
- 6.0
-
icon
default net.minecraft.world.item.ItemStack icon()- Returns:
- A display icon for this section, to be used on the Section Index
- Since:
- 6.0
-
onReload
default void onReload(net.minecraft.core.RegistryAccess registryAccess) Runs everytime the section items are reloaded- Since:
- 6.0
-
items
ConglomerateOfItems items() -
render
void render(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, int topLeftX, int topLeftY) -
add
ConglomerateOfItems redirect helper methods- Since:
- 4.0
-
add
-
add
default T add(net.neoforged.neoforge.registries.DeferredItem<net.minecraft.world.item.Item> deferredItem) -
add
-
add
-
add
-
add
-
add
-
addItemTag
-
renderToggle
default void renderToggle(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, net.minecraft.client.gui.GuiGraphics graphics, Section<?> section, int x, int y, int w, int bannerWidth, int mouseX, int mouseY, boolean isHoveringAny) Renders the toggle button on the right side of the banner of a given section. If isHoveringAny is passed as true, highlights hover texture if shift is being held down.- Since:
- 4.0
-