TagManagerBlock

Importing the class

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.

import crafttweaker.api.tag.TagManagerBlock;

Interfacce Implementate

TagManagerBlock implements the following interfaces. That means all methods defined in these interfaces are also available in TagManagerBlock

Methods

exists

Checks if a tag already exists. Does the same as calling .exists on a tag directly

Return Type: boolean

TagManagerBlock.exists(location as MCResourceLocation) as boolean
ParameterTypeDescription
posizioneMCResourceLocationThe resource location to check for
exists

Checks if a tag already exists. Does the same as calling .exists on a tag directly

Return Type: boolean

TagManagerBlock.exists(name as string) as boolean
ParameterTypeDescription
namestringThe resource location to check for
getAllTags

Retrieves a list of all tags currently registered.

Return Type: stdlib.List<MCTag<T>>

TagManagerBlock.getAllTags() as stdlib.List<MCTag<T>>
myTagManagerBlock.getAllTags();
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.

Return Type: MCTag<T>

TagManagerBlock.getTag(location as MCResourceLocation) as MCTag<T>
ParameterTypeDescription
posizioneMCResourceLocationThe Resource location of the tag
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.

Return Type: MCTag<T>

TagManagerBlock.getTag(name as string) as MCTag<T>
ParameterTypeDescription
namestringThe Resource location of the tag

Operators

CONTAINS

Checks if a tag already exists. Does the same as calling .exists on a tag directly

name as string in myTagManagerBlock

Properties

NameTypeHa GetterHa Setter
allstdlib.List<MCTag<T>>truefalse