public interface Tag<T>
Tags simplifies reference to multiple objects, especially for predicate (testing against) purposes.
A tag is immutable by design. It has a builder, which is a mutable equivalent.
Its entries' iteration may be ordered or unordered, depending on the configuration from the tag builder.
Modifier and Type | Interface and Description |
---|---|
static class |
Tag.Builder
A builder class to ease the creation of tags.
|
static interface |
Tag.Entry |
static interface |
Tag.Identified<T> |
static class |
Tag.ObjectEntry |
static class |
Tag.OptionalObjectEntry |
static class |
Tag.OptionalTagEntry |
static class |
Tag.TagEntry |
static class |
Tag.TrackedEntry |
Modifier and Type | Method and Description |
---|---|
static <T> com.mojang.serialization.Codec<Tag<T>> |
codec(Supplier<TagGroup<T>> groupGetter) |
boolean |
contains(T entry) |
default T |
getRandom(Random random) |
static <T> Tag<T> |
of(Set<T> values) |
List<T> |
values() |