public final class FabricItemGroupBuilder extends Object
Modifier and Type | Method and Description |
---|---|
FabricItemGroupBuilder |
appendItems(Consumer<List<net.minecraft.item.ItemStack>> stacksForDisplay)
This allows for a custom list of items to be displayed in a tab, this enabled tabs to be created with a custom set of items.
|
net.minecraft.item.ItemGroup |
build()
Create an instance of the ItemGroup.
|
static net.minecraft.item.ItemGroup |
build(net.minecraft.util.Identifier identifier,
Supplier<net.minecraft.item.ItemStack> stackSupplier)
This is a single method that makes creating an ItemGroup with an icon one call.
|
static FabricItemGroupBuilder |
create(net.minecraft.util.Identifier identifier)
Create a new Item Group Builder.
|
FabricItemGroupBuilder |
icon(Supplier<net.minecraft.item.ItemStack> stackSupplier)
This is used to add an icon to to the item group.
|
FabricItemGroupBuilder |
stacksForDisplay(Consumer<List<net.minecraft.item.ItemStack>> appender)
Deprecated.
|
public static FabricItemGroupBuilder create(net.minecraft.util.Identifier identifier)
identifier
- the id will become the name of the ItemGroup and will be used for the translation keypublic FabricItemGroupBuilder icon(Supplier<net.minecraft.item.ItemStack> stackSupplier)
stackSupplier
- the supplier should return the item stack that you wish to show on the tab@Deprecated public FabricItemGroupBuilder stacksForDisplay(Consumer<List<net.minecraft.item.ItemStack>> appender)
appendItems(Consumer)
appender
- Add ItemStack's to this list to show in the ItemGrouppublic FabricItemGroupBuilder appendItems(Consumer<List<net.minecraft.item.ItemStack>> stacksForDisplay)
stacksForDisplay
- Add ItemStack's to this list to show in the ItemGrouppublic static net.minecraft.item.ItemGroup build(net.minecraft.util.Identifier identifier, Supplier<net.minecraft.item.ItemStack> stackSupplier)
identifier
- the id will become the name of the ItemGroup and will be used for the translation keystackSupplier
- the supplier should return the item stack that you wish to show on the tabpublic net.minecraft.item.ItemGroup build()