MCTag<T : Object>
A reference to a Tag object. Note that this tag may not exist in the game already, such as when you create new tags. See the MCTag<T>#exists() Method on whether or not this tag already exists.
A tag will be created as soon as you add
This class was added by a mod with mod-id crafttweaker
. So you need to have this mod installed if you want to use this feature.
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.
Implemented Interfaces
MCTag implements the following interfaces. That means all methods defined in these interfaces are also available in MCTag
Casters
Methods
add
Adds the given items to the tag. Creates the tag if it does not exist.
Return Type: void
Adds the given items to the tag. Creates the tag if it does not exist.
Return Type: void
contains
Return Type: boolean
exists
Return Type: boolean
getElements
Return Type: stdlib.List<T>
getId
Return Type: MCResourceLocation
getManager
Return Type: TagManager<T>
remove
Return Type: void
Return Type: void