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
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
Result type | Is Implicit |
---|---|
Result type MCTagWithAmount<T> | Is Implicit true |
Result type string | Is Implicit true |
Methods
Adds the given items to the tag. Creates the tag if it does not exist.
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter items | Type stdlib.List<T> | Description The items to add. Provided as list. |
Adds the given items to the tag. Creates the tag if it does not exist.
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter items | Type T[] | Description The items to add. Can be one or more items. |
Adds the given tag to this tag. Creates the tag if it does not exist.
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter tag | Type MCTag<T> | Description The tag to add. |
Adds the given tags to this tag. Creates the tag if it does not exist.
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter tags | Type stdlib.List<MCTag<T>> | Description The tags to add. |
Return Type: MCTagWithAmount<T>
Return Type: boolean
Parameter | Type | Description |
---|---|---|
Parameter element | Type T | Description No Description Provided |
Return Type: boolean
Return Type: stdlib.List<T>
Return Type: MCResourceLocation
Return Type: TagManager<T>
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter items | Type stdlib.List<T> | Description No Description Provided |
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter items | Type T[] | Description No Description Provided |
Return Type: void
Parameter | Type | Description |
---|---|---|
Parameter tag | Type MCTag<T> | Description No Description Provided |
Return Type: MCTagWithAmount<T>
Parameter | Type | Description |
---|---|---|
Parameter amount | Type int | Description No Description Provided |
Operators
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name elements | Type stdlib.List<T> | Has Getter true | Has Setter false | Description No Description Provided |
Name exists | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name id | Type MCResourceLocation | Has Getter true | Has Setter false | Description No Description Provided |
Name manager | Type TagManager<T> | Has Getter true | Has Setter false | Description No Description Provided |