KnownTagManager<T : Object>

Link to knowntagmanagert--object

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

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.manager.type.KnownTagManager;

Implemented Interfaces

Link to implemented-interfaces

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

Name: addElements

ZenScript
Copy
KnownTagManager.addElements(to as KnownTag<T>, values as T[])
ПараметрТип
Параметр
to
Тип
KnownTag<T>
Параметр
values
Тип
T[]

Name: elements

Gets the elements of the given tag.

Returns: The list of elements in the tag.
Return Type: stdlib.List<T>

ZenScript
Copy
// KnownTagManager.elements(of as KnownTag<T>) as stdlib.List<T>

myKnownTagManager.elements(<tag:items:minecraft:dirt>);
ПараметрТипОписание
Параметр
of
Тип
KnownTag<T>
Описание
The tag to get the elements of.

Name: exists

Checks if a tag with the given id exists and is registered.

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

ZenScript
Copy
// KnownTagManager.exists(id as ResourceLocation) as boolean

myKnownTagManager.exists(<resource:minecraft:wool>);
ПараметрТипОписание
Параметр
id
Тип
ResourceLocation
Описание
The id of the tag to check.

Name: exists

Checks if a tag with the given id exists and is registered.

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

ZenScript
Copy
// KnownTagManager.exists(id as string) as boolean

myKnownTagManager.exists("minecraft:wool");
ПараметрТипОписание
Параметр
id
Тип
string
Описание
The id of the tag to check.

Name: exists

Checks if the given tag exists and is registered.

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

ZenScript
Copy
// KnownTagManager.exists(tag as T) as boolean

myKnownTagManager.exists(<tag:items:minecraft:wool>);
ПараметрТипОписание
Параметр
tag
Тип
T
Описание
The tag to check.

Name: getTagsFor

Ges the tags that contain the given element.

Returns: The tags that contain the given elements.
Return Type: stdlib.List<T>

ZenScript
Copy
KnownTagManager.getTagsFor(element as ResourceLocation) as stdlib.List<T>
ПараметрТип
Параметр
element
Тип
ResourceLocation

Name: getTagsFor

Return Type: stdlib.List<KnownTag<T>>

ZenScript
Copy
KnownTagManager.getTagsFor(element as T) as stdlib.List<KnownTag<T>>
ПараметрТип
Параметр
element
Тип
T

Name: idElements

Gets the ResourceLocation ids of the elements in the given tag.

Returns: A List of ResourceLocation ids of the elements in the given tag.
Return Type: stdlib.List<ResourceLocation>

ZenScript
Copy
// KnownTagManager.idElements(of as T) as stdlib.List<ResourceLocation>

myKnownTagManager.idElements(<tag:items:minecraft:wool>);
ПараметрТипОписание
Параметр
of
Тип
T
Описание
The tag to get the elements of.

Name: removeElements

ZenScript
Copy
KnownTagManager.removeElements(from as KnownTag<T>, values as T[])
ПараметрТип
Параметр
from
Тип
KnownTag<T>
Параметр
values
Тип
T[]

Name: removeId

ZenScript
Copy
KnownTagManager.removeId(from as KnownTag<T>, values as ResourceLocation[])
ПараметрТип
Параметр
from
Тип
KnownTag<T>
Параметр
values
Тип
ResourceLocation[]

Name: tag

Return Type: KnownTag<T>

ZenScript
Copy
KnownTagManager.tag(id as ResourceLocation) as KnownTag<T>
ПараметрТип
Параметр
id
Тип
ResourceLocation

Name: tag

Return Type: KnownTag<T>

ZenScript
Copy
KnownTagManager.tag(id as string) as KnownTag<T>
ПараметрТип
Параметр
id
Тип
string

Name: tagFolder

Gets the tagFolder of this manager.

The tag folder is usually the folder on disk without the tags/ prefix.

Examples:

  • `tags/items` turns into `items`
  • `tags/potion` turns into `potion`
  • `tags/worldgen/biome` turns into `worldgen/biome`

Returns: The tag folder of this manager.
Return Type: string

ZenScript
Copy
// KnownTagManager.tagFolder() as string

myKnownTagManager.tagFolder();

Name: tagMap

Return Type: KnownTag<T>[ResourceLocation]

ZenScript
Copy
// KnownTagManager.tagMap() as KnownTag<T>[ResourceLocation]

myKnownTagManager.tagMap();

Name: tags

Ges the tags that this manager knows about.

Returns: The tags that this manager knows about.
Return Type: stdlib.List<T>

ZenScript
Copy
// KnownTagManager.tags() as stdlib.List<T>

myKnownTagManager.tags();

Операторы

Link to операторы

Name: CONTAINS

Checks if a tag with the given id exists and is registered.

ZenScript
Copy
id as string in myKnownTagManager
"minecraft:wool" in myKnownTagManager

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
tagFolder
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
Gets the tagFolder of this manager.

The tag folder is usually the folder on disk without the tags/ prefix.

Examples:

  • tags/items turns into items

  • tags/potion turns into potion

  • tags/worldgen/biome turns into worldgen/biome

Название
tagMap
Тип
KnownTag<T>[ResourceLocation]
Имеет Getter
true
Имеет Setter
false
Описание
Название
tags
Тип
stdlib.List<T>
Имеет Getter
true
Имеет Setter
false
Описание
Ges the tags that this manager knows about.