Record Class NbtScanQuery

java.lang.Object
java.lang.Record
net.minecraft.nbt.scanner.NbtScanQuery
Record Components:
path -
type -
key -

public record NbtScanQuery(List<String> path, NbtType<?> type, String key) extends Record
A query for scanning the NBT using ExclusiveNbtCollector or SelectiveNbtCollector.
Mappings:
Namespace Name
named net/minecraft/nbt/scanner/NbtScanQuery
intermediary net/minecraft/class_6843
official wd
named path
intermediary comp_318
official a
named type
intermediary comp_319
official b
named key
intermediary comp_320
official c
  • Field Details

    • path

      private final List<String> path
      The field for the path record component.
    • type

      private final NbtType<?> type
      The field for the type record component.
    • key

      private final String key
      The field for the key record component.
  • Constructor Details

    • NbtScanQuery

      public NbtScanQuery(NbtType<?> type, String key)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/nbt/scanner/NbtScanQuery;<init>(Lnet/minecraft/nbt/NbtType;Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_6843;<init>(Lnet/minecraft/class_4614;Ljava/lang/String;)V
      official <init> Lwd;<init>(Lvw;Ljava/lang/String;)V
    • NbtScanQuery

      public NbtScanQuery(String path, NbtType<?> type, String key)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/nbt/scanner/NbtScanQuery;<init>(Ljava/lang/String;Lnet/minecraft/nbt/NbtType;Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_6843;<init>(Ljava/lang/String;Lnet/minecraft/class_4614;Ljava/lang/String;)V
      official <init> Lwd;<init>(Ljava/lang/String;Lvw;Ljava/lang/String;)V
    • NbtScanQuery

      public NbtScanQuery(String path1, String path2, NbtType<?> type, String key)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/nbt/scanner/NbtScanQuery;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/nbt/NbtType;Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_6843;<init>(Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/class_4614;Ljava/lang/String;)V
      official <init> Lwd;<init>(Ljava/lang/String;Ljava/lang/String;Lvw;Ljava/lang/String;)V
    • NbtScanQuery

      public NbtScanQuery(List<String> list, NbtType<?> nbtType, String string)
  • Method Details

    • toString

      public final 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
    • hashCode

      public final 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
    • equals

      public final boolean equals(Object object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • path

      public List<String> path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • type

      public NbtType<?> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component