BracketHandlers
Link to brackethandlers
I advise against using the static methods in this class directly as they may be merged into CrT's BEP at any point. If you need to access the Bracket Expression Parser methods dynamically, you can use
zencode Copyvar myName = "misc";
<itemgroup:${myName}>
This class was added by a mod with mod-id contenttweaker
. 因此,如果要使用此功能,则需要安装此mod。
导入类
Link to 导入类
如果遇到任何问题(例如强制转换数组),则可能需要导入软件包,因此,最好的方式就是导入包支持。
ZenScript Copymods.contenttweaker.BracketHandlers
使用方式
Link to 使用方式
getItemGroup
Link to getitemgroup
Gets the itemGroup. Will throw an error if the group could not be found
Returns: The found MCItemGroup
Return type: mods.contenttweaker.item.MCItemGroup
ZenScript Copy<itemgroup:misc>
mods.contenttweeper.BracketHandlers.getItemGroup(tokens as String);
mods.contenttweeper.BracketHandlers.getItemGroup("misc");
参数 | 类型 | 描述 |
---|---|---|
参数 tokens | 类型 字符串[string] | 描述 What you createDataCompound in the BEP call |
getToolType
Link to gettooltype
Gets a mods.contenttweaker.item.MCToolType. Will create a new one if the given one does not exist.
Returns: The [mods.contenttweaker.item.MCToolType](/mods/contenttweaker/API/item/MCToolType) if found, or a new MCToolType
Return type: mods.contenttweaker.item.MCToolType
ZenScript Copy<tooltype:shovel>
mods.contenttweeper.BracketHandlers.getToolType(tokens as String);
mods.contenttweeper.BracketHandlers.getToolType("shovel");
参数 | 类型 | 描述 |
---|---|---|
参数 tokens | 类型 字符串[string] | 描述 What you would createDataCompound in the BEP call |