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.Builderadd(Tag.Entry entry, String source)Tag.Builderadd(Tag.TrackedEntry trackedEntry)Tag.Builderadd(Identifier id, String source)Tag.BuilderaddTag(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.Buildercreate()voidmethod_32826(Consumer<Identifier> consumer)voidmethod_32828(Consumer<Identifier> consumer)Tag.Builderread(JsonObject json, String source)private static Tag.EntryresolveEntry(JsonElement json)Stream<Tag.TrackedEntry>streamEntries()JsonObjecttoJson()
-
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
-