TagManagerBlock
Link to tagmanagerblock
Importare la Classe
Link to importare-la-classe
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.TagManagerBlock;
Interfacce Implementate
Link to interfacce-implementate
TagManagerBlock implements the following interfaces. That means all methods defined in these interfaces are also available in TagManagerBlock
Metodi
Link to metodi
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 CopyTagManagerBlock.exists(location as MCResourceLocation) as boolean
Parametro | Tipo | Descrizione |
---|---|---|
Parametro posizione | Tipo MCResourceLocation | Descrizione 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 CopyTagManagerBlock.exists(name as string) as boolean
Parametro | Tipo | Descrizione |
---|---|---|
Parametro nome | Tipo string | Descrizione The resource location to check for |
Name: getAllTags
Retrieves a list of all tags currently registered.
Return Type: stdlib.List<MCTag<T>>
ZenScript Copy// TagManagerBlock.getAllTags() as stdlib.List<MCTag<T>>
myTagManagerBlock.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 CopyTagManagerBlock.getTag(location as MCResourceLocation) as MCTag<T>
Parametro | Tipo | Descrizione |
---|---|---|
Parametro posizione | Tipo MCResourceLocation | Descrizione 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 CopyTagManagerBlock.getTag(name as string) as MCTag<T>
Parametro | Tipo | Descrizione |
---|---|---|
Parametro nome | Tipo string | Descrizione The Resource location of the tag |
Operators
Link to operators
Name: CONTAINS
Checks if a tag already exists. Does the same as calling .exists
on a tag directly
ZenScript Copyname as string in myTagManagerBlock
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome all | Tipo stdlib.List<MCTag<T>> | Ha Getter sì | Ha Setter no | Descrizione Retrieves a list of all tags currently registered. |