ofTag

fun <T> ofTag(defaultValue: Identifier, tag: TagKey<T>): ValidatedIdentifier

Builds a ValidatedIdentifier based on an allowable tag of values

Allowable identifiers in this validation will NOT be cached. Tag contents can change over time in a game thanks to reloads.

Return

ValidatedIdentifier wrapping the provided default and tag

Author

fzzyhmstrs

Since

0.2.0, added non-caching 0.5.0

Parameters

defaultValue

the default value of the ValidatedIdentifier

tag

the tag of allowable values to choose from


fun <T> ofTag(tag: TagKey<T>): ValidatedIdentifier

Deprecated

Only use for validation in a list or map

Builds a ValidatedIdentifier based on an allowable tag of values

Uses "minecraft:air" as the default value.

Allowable identifiers in this validation will NOT be cached. Tag contents can change over time in a game thanks to reloads.

Return

ValidatedIdentifier wrapping the provided tag

Author

fzzyhmstrs

Since

0.2.0, added non-caching 0.5.0

Parameters

tag

the tag of allowable values to choose from