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

EntityTypeTagManager

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.EntityTypeTagManager;

Extends

EntityTypeTagManager extends KnownTagManager<EntityType<Entity>>.

Implements

EntityTypeTagManager implements the following interfaces:

ITagManager<KnownTag<T>>,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 EntityTypeTagManager) as bool
myString in myEntityTypeTagManager

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 EntityTypeTagManager) as bool
myResourceLocation in myEntityTypeTagManager

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 EntityTypeTagManager) as bool
myT in myEntityTypeTagManager

Parameters:

tag Type: MCTag - The tag to check.

Return Type: bool

Members

addElements(to as KnownTag<T>, values as T[])
script.zs
// EntityTypeTagManager.addElements(to as KnownTag<T>, values as T[]);
myEntityTypeTagManager.addElements(myKnownTag, myT[]);

Parameters:

to Type: KnownTag<T>
values Type: T[]
addId(to as MCTag, values as ResourceLocation[])
Adds the elements that correspond to the given ResourceLocation to the given tag.
script.zs
// EntityTypeTagManager.addId(to as MCTag, values as ResourceLocation[]);
myEntityTypeTagManager.addId(<tag:items:minecraft:wool>, <resource:minecraft:diamond>);

Parameters:

to Type: MCTag - The tag to add to.
values Type: ResourceLocation[] - The registry key of the elements to add.
clear(from as MCTag)
Clears all values of the given tag.
script.zs
// EntityTypeTagManager.clear(from as MCTag);
myEntityTypeTagManager.clear(<tag:items:minecraft:wool>);

Parameters:

from Type: MCTag - The tag to clear.
Getter
Returns the BEP to get this thingy
script.zs
// EntityTypeTagManager.commandString as string
myEntityTypeTagManager.commandString

Return Type: string

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

Return Type: string

elements(of as KnownTag<T>) as List<T>
Gets the elements of the given tag.

Returns: The list of elements in the tag.

script.zs
// EntityTypeTagManager.elements(of as KnownTag<T>) as List<T>;
myEntityTypeTagManager.elements(<tag:items:minecraft:dirt>);

Parameters:

of Type: KnownTag<T> - The tag to get the elements of.

Return Type: List<T>

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
// EntityTypeTagManager.exists(id as string) as bool;
myEntityTypeTagManager.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
// EntityTypeTagManager.exists(id as ResourceLocation) as bool;
myEntityTypeTagManager.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
// EntityTypeTagManager.exists(tag as MCTag) as bool;
myEntityTypeTagManager.exists(<tag:items:minecraft:wool>);

Parameters:

tag Type: MCTag - The tag to check.

Return Type: bool

getTagsFor(element as T) as List<KnownTag<T>>
script.zs
// EntityTypeTagManager.getTagsFor(element as T) as List<KnownTag<T>>;
myEntityTypeTagManager.getTagsFor(myT);

Parameters:

element Type: T

Return Type: List<KnownTag<T>>

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
// EntityTypeTagManager.getTagsFor(element as ResourceLocation) as List<MCTag>;
myEntityTypeTagManager.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
// EntityTypeTagManager.idElements(of as MCTag) as List<ResourceLocation>;
myEntityTypeTagManager.idElements(<tag:items:minecraft:wool>);

Parameters:

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

Return Type: List<ResourceLocation>

removeElements(from as KnownTag<T>, values as T[])
script.zs
// EntityTypeTagManager.removeElements(from as KnownTag<T>, values as T[]);
myEntityTypeTagManager.removeElements(myKnownTag, myT[]);

Parameters:

from Type: KnownTag<T>
values Type: T[]
removeId(from as KnownTag<T>, values as ResourceLocation[])
script.zs
// EntityTypeTagManager.removeId(from as KnownTag<T>, values as ResourceLocation[]);
myEntityTypeTagManager.removeId(myKnownTag, myResourceLocation[]);

Parameters:

from Type: KnownTag<T>
removeId(from as MCTag, values as ResourceLocation[])
Removes the elements that correspond to the given ResourceLocation from the given tag.
script.zs
// EntityTypeTagManager.removeId(from as MCTag, values as ResourceLocation[]);
myEntityTypeTagManager.removeId(<tag:items:minecraft:wool>, <resource:minecraft:diamond>);

Parameters:

from Type: MCTag - The tag to remove from.
values Type: ResourceLocation[] - The registry key of the elements to remove.
tag(id as string) as KnownTag<T>
script.zs
// EntityTypeTagManager.tag(id as string) as KnownTag<T>;
myEntityTypeTagManager.tag(myString);

Parameters:

id Type: string

Return Type: KnownTag<T>

tag(id as ResourceLocation) as KnownTag<T>
script.zs
// EntityTypeTagManager.tag(id as ResourceLocation) as KnownTag<T>;
myEntityTypeTagManager.tag(myResourceLocation);

Parameters:

Return Type: KnownTag<T>

tag(id as string) as MCTag
Gets a tag with the given id.

Returns: A tag with the given id.

script.zs
// EntityTypeTagManager.tag(id as string) as MCTag;
myEntityTypeTagManager.tag("minecraft:wool");

Parameters:

id Type: string - The id of the tag.

Return Type: MCTag

tag(id as ResourceLocation) as MCTag
Gets a tag with the given id.

Returns: A tag with the given id.

script.zs
// EntityTypeTagManager.tag(id as ResourceLocation) as MCTag;
myEntityTypeTagManager.tag(<resource:minecraft:wool>);

Parameters:

id Type: ResourceLocation - The id of the tag.

Return Type: MCTag

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
// EntityTypeTagManager.tagFolder as string
myEntityTypeTagManager.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
// EntityTypeTagManager.tagFolder() as string;
myEntityTypeTagManager.tagFolder();

Return Type: string

Getter
Gets the keys of the tags that this manager knows about.
script.zs
// EntityTypeTagManager.tagKeys as List<ResourceLocation>
myEntityTypeTagManager.tagKeys

Return Type: List<ResourceLocation>

tagKeys() as 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.

script.zs
// EntityTypeTagManager.tagKeys() as List<ResourceLocation>;
myEntityTypeTagManager.tagKeys();

Return Type: List<ResourceLocation>

Getter
script.zs
// EntityTypeTagManager.tagMap as KnownTag<T>[ResourceLocation]
myEntityTypeTagManager.tagMap

Return Type: KnownTag<T>[ResourceLocation]

Getter
Gets a map of id to tag that this manager knows about.
script.zs
// EntityTypeTagManager.tagMap as MCTag[ResourceLocation]
myEntityTypeTagManager.tagMap

Return Type: MCTag[ResourceLocation]

tagMap() as KnownTag<T>[ResourceLocation]
script.zs
// EntityTypeTagManager.tagMap() as KnownTag<T>[ResourceLocation];
myEntityTypeTagManager.tagMap();

Return Type: KnownTag<T>[ResourceLocation]

tagMap() as MCTag[ResourceLocation]
Gets a map of id to tag that this manager knows about.

Returns: a map of id to tag.

script.zs
// EntityTypeTagManager.tagMap() as MCTag[ResourceLocation];
myEntityTypeTagManager.tagMap();

Return Type: MCTag[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
// EntityTypeTagManager.tags as List<MCTag>
myEntityTypeTagManager.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
// EntityTypeTagManager.tags() as List<MCTag>;
myEntityTypeTagManager.tags();

Return Type: List<MCTag>