Class Tag.Builder

java.lang.Object
net.minecraft.tag.Tag.Builder
Enclosing interface:
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 afc$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 Lafc$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 Lafc$a;a()Lafc$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 Lafc$a;a(Lafc$b;)Lafc$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 Lafc$a;a(Lafc$d;Ljava/lang/String;)Lafc$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 Lafc$a;a(Lwb;Ljava/lang/String;)Lafc$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;
    • addTag

      public Tag.Builder addTag​(Identifier id, String source)
      Mappings:
      Namespace Name Mixin selector
      official c Lafc$a;c(Lwb;Ljava/lang/String;)Lafc$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;
    • 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 Lafc$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 Lafc$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;
    • method_32826

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

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

      public Tag.Builder read​(JsonObject json, String source)
      Mappings:
      Namespace Name Mixin selector
      official a Lafc$a;a(Lcom/google/gson/JsonObject;Ljava/lang/String;)Lafc$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 Lafc$a;a(Lcom/google/gson/JsonElement;)Lafc$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 Lafc$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;