EntityTypeTagManager
Link to entitytypetagmanager
Diese Klasse importieren
Link to diese-klasse-importieren
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 Copyimport crafttweaker.api.tag.manager.type.EntityTypeTagManager;
Extending KnownTagManager<EntityType
Link to extending-knowntagmanagerentitytypeentity
EntityTypeTagManager extends KnownTagManager<EntityType<Entity>>. That means all methods available in KnownTagManager<EntityType<Entity>> are also available in EntityTypeTagManager
Methoden
Link to methoden
Name: addElements
ZenScript CopyEntityTypeTagManager.addElements(to as KnownTag<T>, values as T[])
Parameter | Type |
---|---|
Parameter to | Type KnownTag<T> |
Parameter values | Type 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// EntityTypeTagManager.elements(of as KnownTag<T>) as stdlib.List<T>
myEntityTypeTagManager.elements(<tag:items:minecraft:dirt>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter of | Type KnownTag<T> | Beschreibung 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// EntityTypeTagManager.exists(id as ResourceLocation) as boolean
myEntityTypeTagManager.exists(<resource:minecraft:wool>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter id | Type ResourceLocation | Beschreibung 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// EntityTypeTagManager.exists(id as string) as boolean
myEntityTypeTagManager.exists("minecraft:wool");
Parameter | Type | Beschreibung |
---|---|---|
Parameter id | Type string | Beschreibung 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// EntityTypeTagManager.exists(tag as T) as boolean
myEntityTypeTagManager.exists(<tag:items:minecraft:wool>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter tag | Type T | Beschreibung 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 CopyEntityTypeTagManager.getTagsFor(element as ResourceLocation) as stdlib.List<T>
Parameter | Type |
---|---|
Parameter element | Type ResourceLocation |
Name: getTagsFor
Return Type: stdlib.List<KnownTag<T>>
ZenScript CopyEntityTypeTagManager.getTagsFor(element as T) as stdlib.List<KnownTag<T>>
Parameter | Type |
---|---|
Parameter element | Type 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// EntityTypeTagManager.idElements(of as T) as stdlib.List<ResourceLocation>
myEntityTypeTagManager.idElements(<tag:items:minecraft:wool>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter of | Type T | Beschreibung The tag to get the elements of. |
Name: removeElements
ZenScript CopyEntityTypeTagManager.removeElements(from as KnownTag<T>, values as T[])
Parameter | Type |
---|---|
Parameter from | Type KnownTag<T> |
Parameter values | Type T[] |
Name: removeId
ZenScript CopyEntityTypeTagManager.removeId(from as KnownTag<T>, values as ResourceLocation[])
Parameter | Type |
---|---|
Parameter from | Type KnownTag<T> |
Parameter values | Type ResourceLocation[] |
Name: tag
Return Type: KnownTag<T>
ZenScript CopyEntityTypeTagManager.tag(id as ResourceLocation) as KnownTag<T>
Parameter | Type |
---|---|
Parameter id | Type ResourceLocation |
Name: tag
Return Type: KnownTag<T>
ZenScript CopyEntityTypeTagManager.tag(id as string) as KnownTag<T>
Parameter | Type |
---|---|
Parameter id | Type 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// EntityTypeTagManager.tagFolder() as string
myEntityTypeTagManager.tagFolder();
Name: tagMap
Return Type: KnownTag<T>[ResourceLocation]
ZenScript Copy// EntityTypeTagManager.tagMap() as KnownTag<T>[ResourceLocation]
myEntityTypeTagManager.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// EntityTypeTagManager.tags() as stdlib.List<T>
myEntityTypeTagManager.tags();
Operatoren
Link to operatoren
Name: CONTAINS
Checks if a tag with the given id exists and is registered.
ZenScript Copyid as string in myEntityTypeTagManager
"minecraft:wool" in myEntityTypeTagManager
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Beschreibung |
---|---|---|---|---|
Name tagFolder | Type string | Has Getter true | Has Setter false | Beschreibung Gets the tagFolder of this manager. The tag folder is usually the folder on disk without the tags/ prefix. Examples:
|
Name tagMap | Type KnownTag<T>[ResourceLocation] | Has Getter true | Has Setter false | Beschreibung |
Name tags | Type stdlib.List<T> | Has Getter true | Has Setter false | Beschreibung Ges the tags that this manager knows about. |