Package net.minecraft.tag
Class Tag.Builder
java.lang.Object
net.minecraft.tag.Tag.Builder
public static class Tag.Builder extends Object
A builder class to ease the creation of tags. It can also be used as a
mutable form of a tag.
-
Field Summary
Fields Modifier and Type Field Description private List<Tag.TrackedEntry>
entries
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description Tag.Builder
add(Tag.Entry entry, String source)
Tag.Builder
add(Tag.TrackedEntry trackedEntry)
Tag.Builder
add(Identifier id, String source)
Tag.Builder
addTag(Identifier id, String source)
<T> com.mojang.datafixers.util.Either<Collection<Tag.TrackedEntry>,Tag<T>>
build(Function<Identifier,Tag<T>> tagGetter, Function<Identifier,T> objectGetter)
static Tag.Builder
create()
void
method_32826(Consumer<Identifier> consumer)
void
method_32828(Consumer<Identifier> consumer)
Tag.Builder
read(JsonObject json, String source)
private static Tag.Entry
resolveEntry(JsonElement json)
Stream<Tag.TrackedEntry>
streamEntries()
JsonObject
toJson()
-
Field Details
-
entries
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
create
-
add
-
add
-
add
-
addTag
-
build
public <T> com.mojang.datafixers.util.Either<Collection<Tag.TrackedEntry>,Tag<T>> build(Function<Identifier,Tag<T>> tagGetter, Function<Identifier,T> objectGetter) -
streamEntries
-
method_32826
-
method_32828
-
read
-
resolveEntry
-
toJson
-