Class AstralItemGroup
java.lang.Object
net.minecraft.item.ItemGroup
dev.jaxydog.astral.content.item.group.AstralItemGroup
- All Implemented Interfaces:
Registered,Registered.Common,AstralItemGroup
- Direct Known Subclasses:
AstralCycledItemGroup
An extension of an
ItemGroup that provides commonly used functionality.
This type is automatically registered.
- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilds and constructs an instance of a newAstralItemGroup.Nested classes/interfaces inherited from class net.minecraft.item.ItemGroup
net.minecraft.item.ItemGroup.DisplayContext, net.minecraft.item.ItemGroup.Entries, net.minecraft.item.ItemGroup.EntryCollector, net.minecraft.item.ItemGroup.Row, net.minecraft.item.ItemGroup.StackVisibility, net.minecraft.item.ItemGroup.TypeNested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.Server -
Constructor Summary
ConstructorsModifierConstructorDescriptionAstralItemGroup(String path, net.minecraft.item.ItemGroup.Row row, int column, net.minecraft.item.ItemGroup.Type type, net.minecraft.text.Text displayName, Supplier<net.minecraft.item.ItemStack> iconSupplier, net.minecraft.item.ItemGroup.EntryCollector entryCollector) Creates a new item group.protectedAstralItemGroup(String path, net.minecraft.item.ItemGroup group, net.minecraft.item.ItemGroup.EntryCollector entryCollector) Creates a new item group from a given source. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull AstralItemGroup.BuilderReturns a new builder for anAstralItemGroup.net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup> Returns this item group's associated registry key.Returns this value's associated registry identifier path.voidRegisters this value on both the client and server environments.Methods inherited from class net.minecraft.item.ItemGroup
contains, create, getColumn, getDisplayName, getDisplayStacks, getIcon, getRow, getSearchTabStacks, getTexture, getType, hasScrollbar, hasStacks, isSpecial, reloadSearchProvider, setSearchProviderReloader, shouldDisplay, shouldRenderName, updateEntriesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jaxydog.astral.utility.injected.AstralItemGroup
astral$getIconMethods inherited from interface dev.jaxydog.astral.register.Registered
getRegistryId
-
Constructor Details
-
AstralItemGroup
public AstralItemGroup(String path, net.minecraft.item.ItemGroup.Row row, int column, net.minecraft.item.ItemGroup.Type type, net.minecraft.text.Text displayName, Supplier<net.minecraft.item.ItemStack> iconSupplier, net.minecraft.item.ItemGroup.EntryCollector entryCollector) Creates a new item group.In most cases, you will want to instead use this class' builder.
- Parameters:
path- The item group's identifier path.row- The item group's row.column- The item group's column.type- The item group's type.displayName- The item group's display name.iconSupplier- The item group's preferred icon.entryCollector- The item group's entry collector.- Since:
- 2.0.0
-
AstralItemGroup
protected AstralItemGroup(String path, net.minecraft.item.ItemGroup group, net.minecraft.item.ItemGroup.EntryCollector entryCollector) Creates a new item group from a given source.In most cases, you will want to instead use this class' builder.
- Parameters:
path- The item group's identifier path.group- The source item group.entryCollector- The item group's entry collector.- Since:
- 2.0.0
-
-
Method Details
-
builder
Returns a new builder for anAstralItemGroup.- Parameters:
path- The identifier path.- Returns:
- A new builder.
- Since:
- 2.0.0
-
getRegistryKey
public net.minecraft.registry.RegistryKey<net.minecraft.item.ItemGroup> getRegistryKey()Returns this item group's associated registry key.If the item group has not been registered, this method will throw a run-time exception.
- Returns:
- The associated registry key.
- Since:
- 2.0.0
-
getRegistryPath
Description copied from interface:RegisteredReturns this value's associated registry identifier path.This is by default used to determine the
Identifierprovided byRegistered.getRegistryId(). For example, returning"my_item"will cause the associated identifier to beastral:my_item.- Specified by:
getRegistryPathin interfaceRegistered- Returns:
- An identifier path.
-
registerCommon
public void registerCommon()Description copied from interface:Registered.CommonRegisters this value on both the client and server environments.The contained code will run for both environments. If you only want one or the other, see its sister interfaces.
- Specified by:
registerCommonin interfaceRegistered.Common- See Also:
-