An unknown tag is a tag whose element is not known or has not been registered as Taggable.

Импорт класса

Link to импорт-класса

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.

ZenScript
Copy
import crafttweaker.api.tag.type.UnknownTag;

Implemented Interfaces

Link to implemented-interfaces

UnknownTag implements the following interfaces. That means all methods defined in these interfaces are also available in UnknownTag

Result TypeЯвляется неявным
Result Type
Many<UnknownTag>
Является неявным
true
Result Type
string
Является неявным
true

Name: add

Adds the given tags to this tag.

ZenScript
Copy
// UnknownTag.add(tags as MCTag[])

myUnknownTag.add(<tag:items:minecraft:wool>);
ПараметрТипОписание
Параметр
tags
Тип
MCTag[]
Описание
The tags to add.

Name: addId

Adds the elements that correspond to the given ResourceLocation to this tag.

ZenScript
Copy
// UnknownTag.addId(elements as ResourceLocation[])

myUnknownTag.addId(<resource:minecraft:diamond>);
ПараметрТипОписание
Параметр
elements
Тип
ResourceLocation[]
Описание
The registry key of the elements to add.

Name: asTagWithAmount

Return Type: Many<UnknownTag>

ZenScript
Copy
// UnknownTag.asTagWithAmount() as Many<UnknownTag>

myUnknownTag.asTagWithAmount();

Name: clear

Removes all elements in this tag.

ZenScript
Copy
// UnknownTag.clear()

myUnknownTag.clear();

Name: contains

Checks if this tag contains an element with the given id

Returns: true if it contains the element, false otherwise.
Return Type: boolean

ZenScript
Copy
// UnknownTag.contains(id as ResourceLocation) as boolean

myUnknownTag.contains(<resource:minecraft:white_wool>);
ПараметрТипОписание
Параметр
id
Тип
ResourceLocation
Описание
The ID of the element to check.

Name: equals

Checks if this tag equals the other tag.

Returns: true if the tags are equal, false otherwise.
Return Type: boolean

ZenScript
Copy
// UnknownTag.equals(other as MCTag) as boolean

myUnknownTag.equals(<tag:items:minecraft:wool>);
ПараметрТипОписание
Параметр
other
Тип
MCTag
Описание
The tag to check against.

Name: exists

Checks if this tag exists.

Returns: true if this tag exists, false otherwise.
Return Type: boolean

ZenScript
Copy
// UnknownTag.exists() as boolean

myUnknownTag.exists();

Name: id

Return Type: ResourceLocation

ZenScript
Copy
// UnknownTag.id() as ResourceLocation

myUnknownTag.id();

Name: idElements

Gets the id's of the elements in this tag.

Returns: The id's elements in this tag.
Return Type: stdlib.List<ResourceLocation>

ZenScript
Copy
// UnknownTag.idElements() as stdlib.List<ResourceLocation>

myUnknownTag.idElements();

Name: manager

Return Type: UnknownTagManager

ZenScript
Copy
// UnknownTag.manager() as UnknownTagManager

myUnknownTag.manager();

Name: remove

Removes the given tags from this tag.

ZenScript
Copy
// UnknownTag.remove(tags as MCTag[])

myUnknownTag.remove(<tag:items:minecraft:wool>);
ПараметрТипОписание
Параметр
tags
Тип
MCTag[]
Описание
The tags to remove.

Name: removeId

Removes the elements that correspond to the given ResourceLocation from this tag.

ZenScript
Copy
// UnknownTag.removeId(elements as ResourceLocation[])

myUnknownTag.removeId(<resource:minecraft:diamond>);
ПараметрТипОписание
Параметр
elements
Тип
ResourceLocation[]
Описание
The registry key of the elements to remove.

Name: withAmount

Return Type: Many<UnknownTag>

ZenScript
Copy
UnknownTag.withAmount(amount as int) as Many<UnknownTag>
ПараметрТип
Параметр
amount
Тип
int

Операторы

Link to операторы

Name: CONTAINS

Checks if this tag contains an element with the given id

ZenScript
Copy
id as ResourceLocation in myUnknownTag
<resource:minecraft:white_wool> in myUnknownTag

Name: EQUALS

Checks if this tag equals the other tag.

ZenScript
Copy
myUnknownTag == other as MCTag
myUnknownTag == <tag:items:minecraft:wool>

Name: MUL

ZenScript
Copy
myUnknownTag * amount as int

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
exists
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
Checks if this tag exists.
Название
id
Тип
ResourceLocation
Имеет Getter
true
Имеет Setter
false
Описание
Название
idElements
Тип
stdlib.List<ResourceLocation>
Имеет Getter
true
Имеет Setter
false
Описание
Gets the id's of the elements in this tag.
Название
manager
Тип
UnknownTagManager
Имеет Getter
true
Имеет Setter
false
Описание