addTag

inline fun <T> addTag(tagKey: TagKey<T>, tagBuilder: TagBuilder<T>.() -> Unit): TagKey<T>

Add a tag definition using a TagBuilder callback.

Return

the passed TagKey

Parameters

tagKey

the tag to create or add to or replace

tagBuilder

a callback on TagBuilder to create the tag


inline fun <T, B : TagBuilder<T>> addTag(tagKey: TagKey<T>, builder: B, tagBuilder: B.() -> Unit): TagKey<T>

Add a tag definition using a generic TagBuilder callback.

Return

the passed TagKey

Parameters

tagKey

the tag to create or add to or replace

builder

the TagBuilder instance to use

tagBuilder

a callback on the provided type of TagBuilder to create the tag


fun <T> addTag(tagKey: TagKey<T>, tagBuilder: TagBuilder<T>): TagKey<T>

Add a tag definition using a TagBuilder.

Return

the passed TagKey

Parameters

tagKey

the tag to create or add to or replace

tagBuilder

a TagBuilder to create the tag


fun <T> addTag(tagKey: TagKey<T>, tagEntries: List<TagEntry>, replace: Boolean = false): TagKey<T>

Add a tag definition given its entries and replace value.

Return

the passed TagKey

Parameters

tagKey

the tag to create or add to or replace

tagEntries

the entry list for the tag

replace

whether this tag definition should replace existing tag definitions with the same TagKey in other data packs. Defaults to false


fun <T> addTag(tagKey: TagKey<T>, tagFile: TagFile): TagKey<T>

Add a tag definition given its TagFile description.

Return

the passed TagKey

Parameters

tagKey

the tag to create or add to or replace

tagFile

the tag definition