IntrinsicHolderTagBuilder

class IntrinsicHolderTagBuilder<T>(keyExtractor: (T) -> ResourceKey<T>) : TagBuilder<T>

An extension of TagBuilder which can add elements directly, given a resource key extractor function.

Constructors

Link copied to clipboard
constructor(keyExtractor: (T) -> ResourceKey<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The current value of the replace field.

Functions

Link copied to clipboard
fun add(key: ResourceKey<T>): TagBuilder<T>
fun add(id: ResourceLocation): TagBuilder<T>

Add an element to this tag.

fun add(entry: TagEntry): TagBuilder<T>

Add a TagEntry to this tag.

Link copied to clipboard
fun addOptional(key: ResourceKey<T>): TagBuilder<T>
fun addOptional(id: ResourceLocation): TagBuilder<T>

Add an optional element to this tag.

Link copied to clipboard
fun addOptionalTag(id: ResourceLocation): TagBuilder<T>
fun addOptionalTag(key: TagKey<T>): TagBuilder<T>

Add another optional tag to this tag.

Link copied to clipboard
fun addTag(id: ResourceLocation): TagBuilder<T>
fun addTag(key: TagKey<T>): TagBuilder<T>

Add another tag to this tag.

Link copied to clipboard
fun build(): TagFile

Build the final TagFile

Link copied to clipboard
fun setReplace(replace: Boolean): TagBuilder<T>

Set the value of the replace field.