Package net.minecraft.world.item
Class CreativeModeTab.Builder
java.lang.Object
net.minecraft.world.item.CreativeModeTab.Builder
- Enclosing class:
- CreativeModeTab
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate booleanprivate ResourceLocationprivate Stringprivate booleanprivate final intprivate Componentprivate static final CreativeModeTab.DisplayItemsGeneratorprivate booleanprivate intprivate final CreativeModeTab.Rowprivate intprivate booleanprivate intprivate final List<ResourceLocation>private final List<ResourceLocation>private CreativeModeTab.Type
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbackgroundSuffix(String p_259981_) build()protected CreativeModeTab.Buildertype(CreativeModeTab.Type p_259283_) withBackgroundLocation(ResourceLocation background) Sets the location of the tab background.withLabelColor(int labelColor) Sets the color of the tab label.Gives this tab a search bar.withSearchBar(int searchBarWidth) Gives this tab a search bar, with a specific width.withSlotColor(int slotColor) Sets the color of tab's slots.withTabFactory(Function<CreativeModeTab.Builder, CreativeModeTab> tabFactory) final CreativeModeTab.BuilderwithTabsAfter(ResourceKey<CreativeModeTab>... tabs) Define tabs that should come after this tab.withTabsAfter(ResourceLocation... tabs) Define tabs that should come after this tab.final CreativeModeTab.BuilderwithTabsBefore(ResourceKey<CreativeModeTab>... tabs) Define tabs that should come before this tab.withTabsBefore(ResourceLocation... tabs) Define tabs that should come before this tab.
- 
Field Details- 
EMPTY_GENERATOR
- 
row
- 
columnprivate final int column
- 
displayName
- 
iconGenerator
- 
displayItemsGenerator
- 
canScrollprivate boolean canScroll
- 
showTitleprivate boolean showTitle
- 
alignedRightprivate boolean alignedRight
- 
type
- 
backgroundSuffix
- 
backgroundLocation
- 
hasSearchBarprivate boolean hasSearchBar
- 
searchBarWidthprivate int searchBarWidth
- 
labelColorprivate int labelColor
- 
slotColorprivate int slotColor
- 
tabFactory
- 
tabsBefore
- 
tabsAfter
 
- 
- 
Constructor Details- 
Builder
 
- 
- 
Method Details- 
title
- 
icon
- 
displayItems
- 
alignedRight
- 
hideTitle
- 
noScrollBar
- 
type
- 
backgroundSuffix
- 
withBackgroundLocationSets the location of the tab background.
- 
withSearchBarGives this tab a search bar.Note that, if using a custom background image, you will need to make sure that your image contains the input box and the scroll bar.
- 
withSearchBarGives this tab a search bar, with a specific width.- Parameters:
- searchBarWidth- the width of the search bar
 
- 
withLabelColorSets the color of the tab label.
- 
withSlotColorSets the color of tab's slots.
- 
withTabFactorypublic CreativeModeTab.Builder withTabFactory(Function<CreativeModeTab.Builder, CreativeModeTab> tabFactory) 
- 
withTabsBeforeDefine tabs that should come before this tab. This tab will be placed after thetabs.
- 
withTabsAfterDefine tabs that should come after this tab. This tab will be placed before thetabs.
- 
withTabsBefore@SafeVarargs public final CreativeModeTab.Builder withTabsBefore(ResourceKey<CreativeModeTab>... tabs) Define tabs that should come before this tab. This tab will be placed after thetabs.
- 
withTabsAfter@SafeVarargs public final CreativeModeTab.Builder withTabsAfter(ResourceKey<CreativeModeTab>... tabs) Define tabs that should come after this tab. This tab will be placed before thetabs.
- 
build
 
-