Class Tag.Builder

java.lang.Object
net.minecraft.tag.Tag.Builder
Enclosing class:
Tag<T>

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.
Mappings:
Namespace Name
official aie$a
intermediary net/minecraft/class_3494$class_3495
named net/minecraft/tag/Tag$Builder
  • Field Details

    • entries

      private final List<Tag.TrackedEntry> entries
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a:Ljava/util/List;
      intermediary field_23688 Lnet/minecraft/class_3494$class_3495;field_23688:Ljava/util/List;
      named entries Lnet/minecraft/tag/Tag$Builder;entries:Ljava/util/List;
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • create

      public static Tag.Builder create()
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a()Laie$a;
      intermediary method_26778 Lnet/minecraft/class_3494$class_3495;method_26778()Lnet/minecraft/class_3494$class_3495;
      named create Lnet/minecraft/tag/Tag$Builder;create()Lnet/minecraft/tag/Tag$Builder;
    • add

      public Tag.Builder add(Tag.TrackedEntry trackedEntry)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Laie$b;)Laie$a;
      intermediary method_27064 Lnet/minecraft/class_3494$class_3495;method_27064(Lnet/minecraft/class_3494$class_5145;)Lnet/minecraft/class_3494$class_3495;
      named add Lnet/minecraft/tag/Tag$Builder;add(Lnet/minecraft/tag/Tag$TrackedEntry;)Lnet/minecraft/tag/Tag$Builder;
    • add

      public Tag.Builder add(Tag.Entry entry, String source)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Laie$d;Ljava/lang/String;)Laie$a;
      intermediary method_27065 Lnet/minecraft/class_3494$class_3495;method_27065(Lnet/minecraft/class_3494$class_3496;Ljava/lang/String;)Lnet/minecraft/class_3494$class_3495;
      named add Lnet/minecraft/tag/Tag$Builder;add(Lnet/minecraft/tag/Tag$Entry;Ljava/lang/String;)Lnet/minecraft/tag/Tag$Builder;
    • add

      public Tag.Builder add(Identifier id, String source)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Lyt;Ljava/lang/String;)Laie$a;
      intermediary method_26784 Lnet/minecraft/class_3494$class_3495;method_26784(Lnet/minecraft/class_2960;Ljava/lang/String;)Lnet/minecraft/class_3494$class_3495;
      named add Lnet/minecraft/tag/Tag$Builder;add(Lnet/minecraft/util/Identifier;Ljava/lang/String;)Lnet/minecraft/tag/Tag$Builder;
    • addOptional

      public Tag.Builder addOptional(Identifier id, String source)
      Mappings:
      Namespace Name Mixin selector
      official b Laie$a;b(Lyt;Ljava/lang/String;)Laie$a;
      intermediary method_34891 Lnet/minecraft/class_3494$class_3495;method_34891(Lnet/minecraft/class_2960;Ljava/lang/String;)Lnet/minecraft/class_3494$class_3495;
      named addOptional Lnet/minecraft/tag/Tag$Builder;addOptional(Lnet/minecraft/util/Identifier;Ljava/lang/String;)Lnet/minecraft/tag/Tag$Builder;
    • addTag

      public Tag.Builder addTag(Identifier id, String source)
      Mappings:
      Namespace Name Mixin selector
      official c Laie$a;c(Lyt;Ljava/lang/String;)Laie$a;
      intermediary method_26787 Lnet/minecraft/class_3494$class_3495;method_26787(Lnet/minecraft/class_2960;Ljava/lang/String;)Lnet/minecraft/class_3494$class_3495;
      named addTag Lnet/minecraft/tag/Tag$Builder;addTag(Lnet/minecraft/util/Identifier;Ljava/lang/String;)Lnet/minecraft/tag/Tag$Builder;
    • addOptionalTag

      public Tag.Builder addOptionalTag(Identifier id, String source)
      Mappings:
      Namespace Name Mixin selector
      official d Laie$a;d(Lyt;Ljava/lang/String;)Laie$a;
      intermediary method_34892 Lnet/minecraft/class_3494$class_3495;method_34892(Lnet/minecraft/class_2960;Ljava/lang/String;)Lnet/minecraft/class_3494$class_3495;
      named addOptionalTag Lnet/minecraft/tag/Tag$Builder;addOptionalTag(Lnet/minecraft/util/Identifier;Ljava/lang/String;)Lnet/minecraft/tag/Tag$Builder;
    • build

      public <T> com.mojang.datafixers.util.Either<Collection<Tag.TrackedEntry>,Tag<T>> build(Function<Identifier,Tag<T>> tagGetter, Function<Identifier,T> objectGetter)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/datafixers/util/Either;
      intermediary method_26782 Lnet/minecraft/class_3494$class_3495;method_26782(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/datafixers/util/Either;
      named build Lnet/minecraft/tag/Tag$Builder;build(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/datafixers/util/Either;
    • streamEntries

      public Stream<Tag.TrackedEntry> streamEntries()
      Mappings:
      Namespace Name Mixin selector
      official b Laie$a;b()Ljava/util/stream/Stream;
      intermediary method_26785 Lnet/minecraft/class_3494$class_3495;method_26785()Ljava/util/stream/Stream;
      named streamEntries Lnet/minecraft/tag/Tag$Builder;streamEntries()Ljava/util/stream/Stream;
    • forEachTagId

      public void forEachTagId(Consumer<Identifier> consumer)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Ljava/util/function/Consumer;)V
      intermediary method_32826 Lnet/minecraft/class_3494$class_3495;method_32826(Ljava/util/function/Consumer;)V
      named forEachTagId Lnet/minecraft/tag/Tag$Builder;forEachTagId(Ljava/util/function/Consumer;)V
    • forEachGroupId

      public void forEachGroupId(Consumer<Identifier> consumer)
      Mappings:
      Namespace Name Mixin selector
      official b Laie$a;b(Ljava/util/function/Consumer;)V
      intermediary method_32828 Lnet/minecraft/class_3494$class_3495;method_32828(Ljava/util/function/Consumer;)V
      named forEachGroupId Lnet/minecraft/tag/Tag$Builder;forEachGroupId(Ljava/util/function/Consumer;)V
    • read

      public Tag.Builder read(JsonObject json, String source)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Lcom/google/gson/JsonObject;Ljava/lang/String;)Laie$a;
      intermediary method_26780 Lnet/minecraft/class_3494$class_3495;method_26780(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lnet/minecraft/class_3494$class_3495;
      named read Lnet/minecraft/tag/Tag$Builder;read(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lnet/minecraft/tag/Tag$Builder;
    • resolveEntry

      private static Tag.Entry resolveEntry(JsonElement json)
      Mappings:
      Namespace Name Mixin selector
      official a Laie$a;a(Lcom/google/gson/JsonElement;)Laie$d;
      intermediary method_30740 Lnet/minecraft/class_3494$class_3495;method_30740(Lcom/google/gson/JsonElement;)Lnet/minecraft/class_3494$class_3496;
      named resolveEntry Lnet/minecraft/tag/Tag$Builder;resolveEntry(Lcom/google/gson/JsonElement;)Lnet/minecraft/tag/Tag$Entry;
    • toJson

      public JsonObject toJson()
      Mappings:
      Namespace Name Mixin selector
      official c Laie$a;c()Lcom/google/gson/JsonObject;
      intermediary method_26788 Lnet/minecraft/class_3494$class_3495;method_26788()Lcom/google/gson/JsonObject;
      named toJson Lnet/minecraft/tag/Tag$Builder;toJson()Lcom/google/gson/JsonObject;