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.
import crafttweaker . api.tag.manager . ITagManager;
This type is available in the following loaders:
ITagManager <MCTag >
implements the following interfaces:
CommandStringDisplayable
Undocumented Interfaces Iterable <MCTag >
, Comparable <ITagManager <? > >
Checks if a tag with the given id exists and is registered. // ((id as string) in ITagManager<T : MCTag>) as bool
myString in myITagManager
Parameters:
id: string
Type: string
- The id of the tag to check.
Return Type:
bool
Checks if a tag with the given id exists and is registered. // ((id as ResourceLocation) in ITagManager<T : MCTag>) as bool
myResourceLocation in myITagManager
Return Type:
bool
Checks if the given tag exists and is registered. // ((tag as MCTag) in ITagManager<T : MCTag>) as bool
Return Type:
bool
Adds the elements that correspond to the given ResourceLocation
to the given tag. // ITagManager<T : MCTag>.addId(to as MCTag, values as ResourceLocation[]);
myITagManager . addId( < tag : items:minecraft:wool > , < resource : minecraft:diamond > );
Clears all values of the given tag. // ITagManager<T : MCTag>.clear(from as MCTag);
myITagManager . clear( < tag : items:minecraft:wool > );
Checks if a tag with the given id exists and is registered. Returns : true if it exists, false otherwise.
// ITagManager<T : MCTag>.exists(id as string) as bool;
myITagManager . exists( "minecraft:wool" );
Parameters:
id: string
Type: string
- The id of the tag to check.
Return Type:
bool
Checks if a tag with the given id exists and is registered. Returns : true if it exists, false otherwise.
// ITagManager<T : MCTag>.exists(id as ResourceLocation) as bool;
myITagManager . exists( < resource : minecraft:wool > );
Return Type:
bool
Checks if the given tag exists and is registered. Returns : true if it exists, false otherwise.
// ITagManager<T : MCTag>.exists(tag as MCTag) as bool;
myITagManager . exists( < tag : items:minecraft:wool > );
Return Type:
bool
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.
// ITagManager<T : MCTag>.getTagsFor(element as ResourceLocation) as List<MCTag>;
myITagManager . getTagsFor(myResourceLocation);
Return Type:
List <MCTag >
Gets the ResourceLocation
ids of the elements in the given tag. Returns : A List of ResourceLocation
ids of the elements in the given tag.
// ITagManager<T : MCTag>.idElements(of as MCTag) as List<ResourceLocation>;
myITagManager . idElements( < tag : items:minecraft:wool > );
Parameters:
of: MCTag
Type: MCTag
- The tag to get the elements of.
Return Type:
List <ResourceLocation >
Removes the elements that correspond to the given ResourceLocation
from the given tag. // ITagManager<T : MCTag>.removeId(from as MCTag, values as ResourceLocation[]);
myITagManager . removeId( < tag : items:minecraft:wool > , < resource : minecraft:diamond > );
Gets a tag with the given id. Returns : A tag with the given id.
// ITagManager<T : MCTag>.tag(id as string) as MCTag;
myITagManager . tag( "minecraft:wool" );
Parameters:
id: string
Type: string
- The id of the tag.
Return Type:
MCTag
Gets a tag with the given id. Returns : A tag with the given id.
// ITagManager<T : MCTag>.tag(id as ResourceLocation) as MCTag;
myITagManager . tag( < resource : minecraft:wool > );
Return Type:
MCTag
Gets the tagFolder of this manager. The tag folder is usually the folder on disk without the tags/
prefix.
Examples:
tags/items
turns into items
tags/potion
turns into potion
tags/worldgen/biome
turns into worldgen/biome
// ITagManager<T : MCTag>.tagFolder as string
Return Type:
string
Gets the tagFolder of this manager. The tag folder is usually the folder on disk without the tags/
prefix.
Examples:
tags/items
turns into items
tags/potion
turns into potion
tags/worldgen/biome
turns into worldgen/biome
Returns : The tag folder of this manager.
// ITagManager<T : MCTag>.tagFolder() as string;
myITagManager . tagFolder();
Return Type:
string
Gets the keys of the tags that this manager knows about. // ITagManager<T : MCTag>.tagKeys as List<ResourceLocation>
Return Type:
List <ResourceLocation >
Gets the keys of the tags that this manager knows about. Returns : A List of keys of the tags that this manager knows about.
// ITagManager<T : MCTag>.tagKeys() as List<ResourceLocation>;
Return Type:
List <ResourceLocation >
Gets a map of id to tag that this manager knows about. // ITagManager<T : MCTag>.tagMap as MCTag[ResourceLocation]
Return Type:
MCTag [ResourceLocation ]
Gets a map of id to tag that this manager knows about. Returns : a map of id to tag.
// ITagManager<T : MCTag>.tagMap() as MCTag[ResourceLocation];
Return Type:
MCTag [ResourceLocation ]
Ges the tags that this manager knows about. This method needs to be overriden with a covariant return type and exposed to ZenCode. // ITagManager<T : MCTag>.tags as List<MCTag>
Return Type:
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.
// ITagManager<T : MCTag>.tags() as List<MCTag>;
Return Type:
List <MCTag >