Expansion for ItemGroup

Link to expansion-for-itemgroup

This expansion was added by a mod with mod-id contenttweaker. 因此,如果要使用此功能,则需要安装此mod。

Name: create

Creates a new custom item group. Throws an exception when trying creating two item groups with the same name.

Returns: the new item group
Return Type: ItemGroup

ZenScript
Copy
// ItemGroup.create(name as string, iconSupplier as IIconSupplier) as ItemGroup

ItemGroup.create("contenttweaker", () => <item:minecraft:dragon_egg>);
参数类型描述
参数
name(名称)
类型
string
描述
the name of the item group
参数
iconSupplier
类型
IIconSupplier
描述
the function to get the icon of the item group