MCTag
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.
import crafttweaker.api.tag.MCTag;
Description
Loaders
This type is available in the following loaders:
crafttweaker
tags
Implements
MCTag
implements the following interfaces:
Undocumented Interfaces
Comparable<MCTag>
Operators
in(id as ResourceLocation) as bool
Checks if this tag contains an element with the given idscript.zs
myResourceLocation in myMCTag
Parameters:
Return Type:
bool
Members
addId(elements as ResourceLocation[])
Adds the elements that correspond to the given script.zs
ResourceLocation
to this tag.myMCTag.addId(<resource:minecraft:diamond>);
Parameters:
clear()
Removes all elements in this tag.script.zs
// MCTag.clear();myMCTag.clear();
contains(id as ResourceLocation) as bool
Checks if this tag contains an element with the given idscript.zs
Returns: true if it contains the element, false otherwise.
myMCTag.contains(<resource:minecraft:white_wool>);
Parameters:
Return Type:
bool
Getter
Checks if this tag exists.script.zs
// MCTag.exists as boolmyMCTag.exists
Return Type:
bool
exists() as bool
Checks if this tag exists.script.zs
Returns: true if this tag exists, false otherwise.
// MCTag.exists() as bool;myMCTag.exists();
Return Type:
bool
Getter
Gets the id of this tag.script.zs
// MCTag.id as ResourceLocationmyMCTag.id
Return Type:
ResourceLocation
id() as ResourceLocation
Gets the id of this tag.script.zs
Returns: The id of this tag.
myMCTag.id();
Return Type:
ResourceLocation
Getter
Gets the id's of the elements in this tag.script.zs
myMCTag.idElements
Return Type:
List<ResourceLocation>
idElements() as List<ResourceLocation>
Gets the id's of the elements in this tag.script.zs
Returns: The id's elements in this tag.
myMCTag.idElements();
Return Type:
List<ResourceLocation>
removeId(elements as ResourceLocation[])
Removes the elements that correspond to the given script.zs
ResourceLocation
from this tag.myMCTag.removeId(<resource:minecraft:diamond>);
Parameters: