Class NbtString

java.lang.Object
net.minecraft.nbt.NbtString
All Implemented Interfaces:
NbtElement

public class NbtString
extends Object
implements NbtElement
Represents an NBT string.

This class uses the NBT type 8.

Mappings:
Namespace Name
official nh
intermediary net/minecraft/class_2519
named net/minecraft/nbt/NbtString
  • Field Details

    • TYPE

      public static final NbtType<NbtString> TYPE
      Mappings:
      Namespace Name Mixin selector
      official a Lnh;a:Lnl;
      intermediary field_21045 Lnet/minecraft/class_2519;field_21045:Lnet/minecraft/class_4614;
      named TYPE Lnet/minecraft/nbt/NbtString;TYPE:Lnet/minecraft/nbt/NbtType;
    • EMPTY

      private static final NbtString EMPTY
      Mappings:
      Namespace Name Mixin selector
      official b Lnh;b:Lnh;
      intermediary field_21046 Lnet/minecraft/class_2519;field_21046:Lnet/minecraft/class_2519;
      named EMPTY Lnet/minecraft/nbt/NbtString;EMPTY:Lnet/minecraft/nbt/NbtString;
    • value

      private final String value
      Mappings:
      Namespace Name Mixin selector
      official c Lnh;c:Ljava/lang/String;
      intermediary field_11590 Lnet/minecraft/class_2519;field_11590:Ljava/lang/String;
      named value Lnet/minecraft/nbt/NbtString;value:Ljava/lang/String;
  • Constructor Details

    • NbtString

      private NbtString​(String value)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lnh;<init>(Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_2519;<init>(Ljava/lang/String;)V
      named <init> Lnet/minecraft/nbt/NbtString;<init>(Ljava/lang/String;)V
  • Method Details

    • of

      public static NbtString of​(String value)
      Mappings:
      Namespace Name Mixin selector
      official a Lnh;a(Ljava/lang/String;)Lnh;
      intermediary method_23256 Lnet/minecraft/class_2519;method_23256(Ljava/lang/String;)Lnet/minecraft/class_2519;
      named of Lnet/minecraft/nbt/NbtString;of(Ljava/lang/String;)Lnet/minecraft/nbt/NbtString;
    • write

      public void write​(DataOutput output) throws IOException
      Specified by:
      write in interface NbtElement
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Lnj;a(Ljava/io/DataOutput;)V
      intermediary method_10713 Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)V
      named write Lnet/minecraft/nbt/NbtElement;write(Ljava/io/DataOutput;)V
    • getType

      public byte getType()
      Gets the type of this NBT element.
      Specified by:
      getType in interface NbtElement
      Returns:
      the type
      Mappings:
      Namespace Name Mixin selector
      official a Lnj;a()B
      intermediary method_10711 Lnet/minecraft/class_2520;method_10711()B
      named getType Lnet/minecraft/nbt/NbtElement;getType()B
    • getNbtType

      public NbtType<NbtString> getNbtType()
      Gets the NBT type definition of this NBT element.
      Specified by:
      getNbtType in interface NbtElement
      Returns:
      the element type definition
      Mappings:
      Namespace Name Mixin selector
      official b Lnj;b()Lnl;
      intermediary method_23258 Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;
      named getNbtType Lnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;
    • toString

      public String toString()
      Specified by:
      toString in interface NbtElement
      Overrides:
      toString in class Object
      Mappings:
      Namespace Name Mixin selector
      official toString Lnj;toString()Ljava/lang/String;
      intermediary toString Lnet/minecraft/class_2520;toString()Ljava/lang/String;
      named toString Lnet/minecraft/nbt/NbtElement;toString()Ljava/lang/String;
    • copy

      public NbtString copy()
      Description copied from interface: NbtElement
      Copies this NBT element.
      Specified by:
      copy in interface NbtElement
      Returns:
      the copied element
      Mappings:
      Namespace Name Mixin selector
      official d Lnh;d()Lnh;
      intermediary method_10705 Lnet/minecraft/class_2519;method_10705()Lnet/minecraft/class_2519;
      named copy Lnet/minecraft/nbt/NbtString;copy()Lnet/minecraft/nbt/NbtString;
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      official equals Lnh;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_2519;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/nbt/NbtString;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Mappings:
      Namespace Name Mixin selector
      official hashCode Lnh;hashCode()I
      intermediary hashCode Lnet/minecraft/class_2519;hashCode()I
      named hashCode Lnet/minecraft/nbt/NbtString;hashCode()I
    • asString

      public String asString()
      Specified by:
      asString in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      official e_ Lnj;e_()Ljava/lang/String;
      intermediary method_10714 Lnet/minecraft/class_2520;method_10714()Ljava/lang/String;
      named asString Lnet/minecraft/nbt/NbtElement;asString()Ljava/lang/String;
    • accept

      public void accept​(NbtElementVisitor visitor)
      Specified by:
      accept in interface NbtElement
      Mappings:
      Namespace Name Mixin selector
      official a Lnj;a(Lnn;)V
      intermediary method_32289 Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)V
      named accept Lnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/visitor/NbtElementVisitor;)V
    • escape

      public static String escape​(String value)
      Mappings:
      Namespace Name Mixin selector
      official b Lnh;b(Ljava/lang/String;)Ljava/lang/String;
      intermediary method_10706 Lnet/minecraft/class_2519;method_10706(Ljava/lang/String;)Ljava/lang/String;
      named escape Lnet/minecraft/nbt/NbtString;escape(Ljava/lang/String;)Ljava/lang/String;