ItemGroup
An ItemGroup is a group of Items that is shown in the Creative mode inventory.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.item.ItemGroup;Methods
Fills the given List with this ItemGroup’s Items.
Return Type: void
// ItemGroup.fill(items as stdlib.List<IItemStack>) as void
<itemgroup:misc>.fill(new List<IItemStack>(););| Parameter | Type | Description | 
|---|---|---|
| Parameteritems | Typestdlib.List<IItemStack> | DescriptionThe list to fill. | 
Gets the translated ItemGroup name.
Returns: The translated ItemGroup name.
Return Type: MCTextComponent
// ItemGroup.getGroupName() as MCTextComponent
<itemgroup:misc>.getGroupName();Gets the items in this ItemGroup.
Returns: A list containing all the items in this ItemGroup.
Return Type: stdlib.List<IItemStack>
// ItemGroup.getItems() as stdlib.List<IItemStack>
<itemgroup:misc>.getItems();Gets the color of the ItemGroup’s name.
Returns: The color of the ItemGroup’s name.
Return Type: int
// ItemGroup.getLabelColor() as int
<itemgroup:misc>.getLabelColor();Gets the path of this ItemGroup. The path is the name of the ItemGroup.
Returns: The path of this ItemGroup.
Return Type: string
// ItemGroup.getPath() as string
<itemgroup:misc>.getPath();Gets the relevant EnchantmentTypes of this ItemGroup. The EnchantmentTypes are used to determine what enchanted books should be put in the tab.
Returns: This ItemGroup’s enchantment types.
Return Type: EnchantmentType[]
// ItemGroup.getRelevantEnchantmentTypes() as EnchantmentType[]
<itemgroup:misc>.getRelevantEnchantmentTypes();Gets the width of the searchbar.
Returns: The width of the searchbar.
Return Type: int
// ItemGroup.getSearchbarWidth() as int
<itemgroup:misc>.getSearchbarWidth();Gets the slot color that this ItemGroup uses.
Returns: The slot color that this ItemGroup uses.
Return Type: int
// ItemGroup.getSlotColor() as int
<itemgroup:misc>.getSlotColor();Gets the page in the Creative Menu that this ItemGroup is on.
Returns: The page that this ItemGroup is on.
Return Type: int
// ItemGroup.getTabPage() as int
<itemgroup:misc>.getTabPage();Checks if this ItemGroup has the given EnchantmentType.
Returns: True if it contains the EnchantmentType. False otherwise.
Return Type: boolean
// ItemGroup.hasRelevantEnchantmentType(enchantmentType as EnchantmentType?) as boolean
<itemgroup:misc>.hasRelevantEnchantmentType(EnchantmentType.ARMOR);| Parameter | Type | Description | 
|---|---|---|
| ParameterenchantmentType | TypeEnchantmentType? | DescriptionThe EnchantmentType to check. | 
Checks if this ItemGroup has a search bar.
Returns: True if this ItemGroup has a search bar. False otherwise.
Return Type: boolean
// ItemGroup.hasSearchBar() as boolean
<itemgroup:misc>.hasSearchBar();Properties
| Name | Type | Has Getter | Has Setter | Description | 
|---|---|---|---|---|
| NamecommandString | Typestring | Has Gettertrue | Has Setterfalse | DescriptionNo Description Provided | 
| NamegroupName | TypeMCTextComponent | Has Gettertrue | Has Setterfalse | DescriptionGets the translated ItemGroup name. | 
| Nameitems | Typestdlib.List<IItemStack> | Has Gettertrue | Has Setterfalse | DescriptionGets the items in this ItemGroup. | 
| NamelabelColor | Typeint | Has Gettertrue | Has Setterfalse | DescriptionGets the color of the ItemGroup’s name. | 
| Namepage | Typeint | Has Gettertrue | Has Setterfalse | DescriptionGets the page in the Creative Menu that this ItemGroup is on. | 
| Namepath | Typestring | Has Gettertrue | Has Setterfalse | DescriptionGets the path of this ItemGroup. The path is the name of the ItemGroup. | 
| NamerelevantEnchantmentTypes | TypeEnchantmentType[] | Has Gettertrue | Has Setterfalse | DescriptionGets the relevant EnchantmentTypes of this ItemGroup. The EnchantmentTypes are used to determine what enchanted books should be put in the tab. | 
| NamesearchBar | Typeboolean | Has Gettertrue | Has Setterfalse | DescriptionChecks if this ItemGroup has a search bar. | 
| NamesearchBarWidth | Typeint | Has Gettertrue | Has Setterfalse | DescriptionGets the width of the searchbar. | 
| NameslotColor | Typeint | Has Gettertrue | Has Setterfalse | DescriptionGets the slot color that this ItemGroup uses. |