TagManagerFluid
Link to tagmanagerfluid
导入类
Link to 导入类
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.
ZenScript Copyimport crafttweaker.api.tag.TagManagerFluid;
已实现的接口
Link to 已实现的接口
TagManagerFluid implements the following interfaces. That means all methods defined in these interfaces are also available in TagManagerFluid
使用方式
Link to 使用方式
Name: exists
Checks if a tag already exists. Does the same as calling .exists
on a tag directly
Returns: Whether or not this tag already exists
Return Type: boolean
ZenScript CopyTagManagerFluid.exists(location as MCResourceLocation) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 位置 | 类型 MCResourceLocation | 描述 The resource location to check for |
Name: exists
Checks if a tag already exists. Does the same as calling .exists
on a tag directly
Returns: Whether or not this tag already exists
Return Type: boolean
ZenScript CopyTagManagerFluid.exists(name as string) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The resource location to check for |
Name: getAllTags
Retrieves a list of all tags currently registered.
Return Type: stdlib.List<MCTag<T>>
ZenScript Copy// TagManagerFluid.getAllTags() as stdlib.List<MCTag<T>>
myTagManagerFluid.getAllTags();
Name: getTag
Retrieves a tag by its name. Will also be called by the BEP.
Note that this method does not yet create the tag if it does not exist. Adding something to the object created by this tag will create it for the game.
Returns: A Tag object.
Return Type: MCTag<T>
ZenScript CopyTagManagerFluid.getTag(location as MCResourceLocation) as MCTag<T>
参数 | 类型 | 描述 |
---|---|---|
参数 位置 | 类型 MCResourceLocation | 描述 The Resource location of the tag |
Name: getTag
Retrieves a tag by its name. Will also be called by the BEP.
Note that this method does not yet create the tag if it does not exist. Adding something to the object created by this tag will create it for the game.
Returns: A Tag object.
Return Type: MCTag<T>
ZenScript CopyTagManagerFluid.getTag(name as string) as MCTag<T>
参数 | 类型 | 描述 |
---|---|---|
参数 name(名称) | 类型 string | 描述 The Resource location of the tag |
运算符
Link to 运算符
Name: CONTAINS
Checks if a tag already exists. Does the same as calling .exists
on a tag directly
ZenScript Copyname as string in myTagManagerFluid
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 all | 类型 stdlib.List<MCTag<T>> | 可获得 true | 可设置 false | 描述 Retrieves a list of all tags currently registered. |