TagManagerItem
Link to tagmanageritem
Импорт класса
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.TagManagerItem;
Implemented Interfaces
Link to implemented-interfaces
TagManagerItem implements the following interfaces. That means all methods defined in these interfaces are also available in TagManagerItem
Методы
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 CopyTagManagerItem.exists(location as MCResourceLocation) as boolean
Параметр | Тип | Описание |
---|---|---|
Параметр местоположение | Тип Расположение MCResource-ресурсов | Описание 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 CopyTagManagerItem.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// TagManagerItem.getAllTags() as stdlib.List<MCTag<T>>
myTagManagerItem.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 CopyTagManagerItem.getTag(location as MCResourceLocation) as MCTag<T>
Параметр | Тип | Описание |
---|---|---|
Параметр местоположение | Тип Расположение MCResource-ресурсов | Описание 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 CopyTagManagerItem.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 myTagManagerItem
Свойства
Link to свойства
Название | Тип | Имеет Getter | Имеет Setter | Описание |
---|---|---|---|---|
Название all | Тип stdlib.List<MCTag<T>> | Имеет Getter true | Имеет Setter false | Описание Retrieves a list of all tags currently registered. |