Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

UnknownTagManager

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.tag.manager.type.UnknownTagManager;

Loaders

This type is available in the following loaders:

  • crafttweaker
  • tags

Implements

UnknownTagManager implements the following interfaces:

ITagManager<UnknownTag>,CommandStringDisplayable

Undocumented Interfaces

Iterable<MCTag>,Comparable<ITagManager<?>>

Operators

in(id as string) as bool
Checks if a tag with the given id exists and is registered.
script.zs
// ((id as string) in UnknownTagManager) as bool
myString in myUnknownTagManager

Parameters:

id Type: string - The id of the tag to check.

Return Type: bool

in(id as ResourceLocation) as bool
Checks if a tag with the given id exists and is registered.
script.zs
// ((id as ResourceLocation) in UnknownTagManager) as bool
myResourceLocation in myUnknownTagManager

Parameters:

id Type: ResourceLocation - The id of the tag to check.

Return Type: bool

in(tag as MCTag) as bool
Checks if the given tag exists and is registered.
script.zs
// ((tag as MCTag) in UnknownTagManager) as bool
myT in myUnknownTagManager

Parameters:

tag Type: MCTag - The tag to check.

Return Type: bool

Members

addId(to as UnknownTag, values as ResourceLocation[])
script.zs
// UnknownTagManager.addId(to as UnknownTag, values as ResourceLocation[]);
myUnknownTagManager.addId(myUnknownTag, myResourceLocation[]);

Parameters:

Getter
Returns the BEP to get this thingy
script.zs
// UnknownTagManager.commandString as string
myUnknownTagManager.commandString

Return Type: string

commandString() as string
Returns the BEP to get this thingy
script.zs
// UnknownTagManager.commandString() as string;
myUnknownTagManager.commandString();

Return Type: string

exists(id as string) as bool
Checks if a tag with the given id exists and is registered.

Returns: true if it exists, false otherwise.

script.zs
// UnknownTagManager.exists(id as string) as bool;
myUnknownTagManager.exists("minecraft:wool");

Parameters:

id Type: string - The id of the tag to check.

Return Type: bool

exists(id as ResourceLocation) as bool
Checks if a tag with the given id exists and is registered.

Returns: true if it exists, false otherwise.

script.zs
// UnknownTagManager.exists(id as ResourceLocation) as bool;
myUnknownTagManager.exists(<resource:minecraft:wool>);

Parameters:

id Type: ResourceLocation - The id of the tag to check.

Return Type: bool

exists(tag as MCTag) as bool
Checks if the given tag exists and is registered.

Returns: true if it exists, false otherwise.

script.zs
// UnknownTagManager.exists(tag as MCTag) as bool;
myUnknownTagManager.exists(<tag:items:minecraft:wool>);

Parameters:

tag Type: MCTag - The tag to check.

Return Type: bool

getTagsFor(element as ResourceLocation) as List<MCTag>
Ges the tags that contain the given element.
This method needs to be overriden with a covariant return type and exposed to ZenCode.

Returns: The tags that contain the given elements.

script.zs
// UnknownTagManager.getTagsFor(element as ResourceLocation) as List<MCTag>;
myUnknownTagManager.getTagsFor(myResourceLocation);

Parameters:

Return Type: List<MCTag>

idElements(of as MCTag) as List<ResourceLocation>
Gets the ResourceLocation ids of the elements in the given tag.

Returns: A List of ResourceLocation ids of the elements in the given tag.

script.zs
// UnknownTagManager.idElements(of as MCTag) as List<ResourceLocation>;
myUnknownTagManager.idElements(<tag:items:minecraft:wool>);

Parameters:

of Type: MCTag - The tag to get the elements of.

Return Type: List<ResourceLocation>

removeId(from as UnknownTag, values as ResourceLocation[])
script.zs
// UnknownTagManager.removeId(from as UnknownTag, values as ResourceLocation[]);
myUnknownTagManager.removeId(myUnknownTag, myResourceLocation[]);

Parameters:

from Type: UnknownTag
tag(id as string) as UnknownTag
script.zs
// UnknownTagManager.tag(id as string) as UnknownTag;
myUnknownTagManager.tag(myString);

Parameters:

id Type: string

Return Type: UnknownTag

tag(id as ResourceLocation) as UnknownTag
script.zs
// UnknownTagManager.tag(id as ResourceLocation) as UnknownTag;
myUnknownTagManager.tag(myResourceLocation);

Parameters:

Return Type: UnknownTag

Getter
Gets the tagFolder of this manager.

The tag folder is usually the folder on disk without the tags/ prefix.


Examples:



  1. tags/items turns into items

  2. tags/potion turns into potion

  3. tags/worldgen/biome turns into worldgen/biome
script.zs
// UnknownTagManager.tagFolder as string
myUnknownTagManager.tagFolder

Return Type: string

tagFolder() as string
Gets the tagFolder of this manager.

The tag folder is usually the folder on disk without the tags/ prefix.


Examples:



  1. tags/items turns into items

  2. tags/potion turns into potion

  3. tags/worldgen/biome turns into worldgen/biome

Returns: The tag folder of this manager.

script.zs
// UnknownTagManager.tagFolder() as string;
myUnknownTagManager.tagFolder();

Return Type: string

Getter
script.zs
// UnknownTagManager.tagMap as UnknownTag[ResourceLocation]
myUnknownTagManager.tagMap

Return Type: UnknownTag[ResourceLocation]

tagMap() as UnknownTag[ResourceLocation]
script.zs
// UnknownTagManager.tagMap() as UnknownTag[ResourceLocation];
myUnknownTagManager.tagMap();

Return Type: UnknownTag[ResourceLocation]

Getter
Ges the tags that this manager knows about.
This method needs to be overriden with a covariant return type and exposed to ZenCode.
script.zs
// UnknownTagManager.tags as List<MCTag>
myUnknownTagManager.tags

Return Type: List<MCTag>

tags() as List<MCTag>
Ges the tags that this manager knows about.
This method needs to be overriden with a covariant return type and exposed to ZenCode.

Returns: The tags that this manager knows about.

script.zs
// UnknownTagManager.tags() as List<MCTag>;
myUnknownTagManager.tags();

Return Type: List<MCTag>