Record Class EntityNbtDataSource

java.lang.Object
java.lang.Record
net.minecraft.text.EntityNbtDataSource
Record Components:
rawSelector -
selector -
All Implemented Interfaces:
NbtDataSource

public record EntityNbtDataSource(String rawSelector, @Nullable EntitySelector selector) extends Record implements NbtDataSource
Mappings:
Namespace Name
named net/minecraft/text/EntityNbtDataSource
intermediary net/minecraft/class_2576
official yb
named rawSelector
intermediary comp_735
official d
named selector
intermediary comp_736
official e
  • Field Details

    • rawSelector

      private final String rawSelector
      The field for the rawSelector record component.
    • selector

      @Nullable private final @Nullable EntitySelector selector
      The field for the selector record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<EntityNbtDataSource> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/text/EntityNbtDataSource;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_46617 Lnet/minecraft/class_2576;field_46617:Lcom/mojang/serialization/MapCodec;
      official a Lyb;a:Lcom/mojang/serialization/MapCodec;
    • TYPE

      public static final NbtDataSource.Type<EntityNbtDataSource> TYPE
      Mappings:
      Namespace Name Mixin selector
      named TYPE Lnet/minecraft/text/EntityNbtDataSource;TYPE:Lnet/minecraft/text/NbtDataSource$Type;
      intermediary field_46618 Lnet/minecraft/class_2576;field_46618:Lnet/minecraft/class_7419$class_8827;
      official b Lyb;b:Lya$a;
  • Constructor Details

    • EntityNbtDataSource

      public EntityNbtDataSource(String rawPath)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/text/EntityNbtDataSource;<init>(Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_2576;<init>(Ljava/lang/String;)V
      official <init> Lyb;<init>(Ljava/lang/String;)V
    • EntityNbtDataSource

      public EntityNbtDataSource(String rawPath, @Nullable @Nullable EntitySelector entitySelector)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/text/EntityNbtDataSource;<init>(Ljava/lang/String;Lnet/minecraft/command/EntitySelector;)V
      intermediary <init> Lnet/minecraft/class_2576;<init>(Ljava/lang/String;Lnet/minecraft/class_2300;)V
      official <init> Lyb;<init>(Ljava/lang/String;Lhi;)V
  • Method Details

    • parseSelector

      @Nullable private static @Nullable EntitySelector parseSelector(String rawSelector)
      Mappings:
      Namespace Name Mixin selector
      named parseSelector Lnet/minecraft/text/EntityNbtDataSource;parseSelector(Ljava/lang/String;)Lnet/minecraft/command/EntitySelector;
      intermediary method_10923 Lnet/minecraft/class_2576;method_10923(Ljava/lang/String;)Lnet/minecraft/class_2300;
      official a Lyb;a(Ljava/lang/String;)Lhi;
    • get

      public Stream<NbtCompound> get(ServerCommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      get in interface NbtDataSource
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/text/NbtDataSource;get(Lnet/minecraft/server/command/ServerCommandSource;)Ljava/util/stream/Stream;
      intermediary method_10916 Lnet/minecraft/class_7419;method_10916(Lnet/minecraft/class_2168;)Ljava/util/stream/Stream;
      official a Lya;a(Let;)Ljava/util/stream/Stream;
    • getType

      public NbtDataSource.Type<?> getType()
      Specified by:
      getType in interface NbtDataSource
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/text/NbtDataSource;getType()Lnet/minecraft/text/NbtDataSource$Type;
      intermediary method_54225 Lnet/minecraft/class_7419;method_54225()Lnet/minecraft/class_7419$class_8827;
      official a Lya;a()Lya$a;
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • rawSelector

      public String rawSelector()
      Returns the value of the rawSelector record component.
      Returns:
      the value of the rawSelector record component
    • selector

      @Nullable public @Nullable EntitySelector selector()
      Returns the value of the selector record component.
      Returns:
      the value of the selector record component