Class CompoundTag

java.lang.Object
net.minecraft.nbt.CompoundTag
All Implemented Interfaces:
Tag

public class CompoundTag extends Object implements Tag
  • Field Details

  • Constructor Details

    • CompoundTag

      protected CompoundTag(Map<String,Tag> p_128333_)
    • CompoundTag

      public CompoundTag()
  • Method Details

    • builder

      public static INBTBuilder.Builder builder()
    • write

      public void write(DataOutput p_128341_) throws IOException
      Specified by:
      write in interface Tag
      Throws:
      IOException
    • sizeInBytes

      public int sizeInBytes()
      Specified by:
      sizeInBytes in interface Tag
    • getAllKeys

      public Set<String> getAllKeys()
    • getId

      public byte getId()
      Specified by:
      getId in interface Tag
    • getType

      public TagType<CompoundTag> getType()
      Specified by:
      getType in interface Tag
    • size

      public int size()
    • put

      @Nullable public Tag put(String p_128366_, Tag p_128367_)
    • putByte

      public void putByte(String p_128345_, byte p_128346_)
    • putShort

      public void putShort(String p_128377_, short p_128378_)
    • putInt

      public void putInt(String p_128406_, int p_128407_)
    • putLong

      public void putLong(String p_128357_, long p_128358_)
    • putUUID

      public void putUUID(String p_128363_, UUID p_128364_)
    • getUUID

      public UUID getUUID(String p_128343_)
    • hasUUID

      public boolean hasUUID(String p_128404_)
    • putFloat

      public void putFloat(String p_128351_, float p_128352_)
    • putDouble

      public void putDouble(String p_128348_, double p_128349_)
    • putString

      public void putString(String p_128360_, String p_128361_)
    • putByteArray

      public void putByteArray(String p_128383_, byte[] p_128384_)
    • putByteArray

      public void putByteArray(String p_177854_, List<Byte> p_177855_)
    • putIntArray

      public void putIntArray(String p_128386_, int[] p_128387_)
    • putIntArray

      public void putIntArray(String p_128409_, List<Integer> p_128410_)
    • putLongArray

      public void putLongArray(String p_128389_, long[] p_128390_)
    • putLongArray

      public void putLongArray(String p_128429_, List<Long> p_128430_)
    • putBoolean

      public void putBoolean(String p_128380_, boolean p_128381_)
    • get

      @Nullable public Tag get(String p_128424_)
    • getTagType

      public byte getTagType(String p_128436_)
    • contains

      public boolean contains(String p_128442_)
    • contains

      public boolean contains(String p_128426_, int p_128427_)
    • getByte

      public byte getByte(String p_128446_)
    • getShort

      public short getShort(String p_128449_)
    • getInt

      public int getInt(String p_128452_)
    • getLong

      public long getLong(String p_128455_)
    • getFloat

      public float getFloat(String p_128458_)
    • getDouble

      public double getDouble(String p_128460_)
    • getString

      public String getString(String p_128462_)
    • getByteArray

      public byte[] getByteArray(String p_128464_)
    • getIntArray

      public int[] getIntArray(String p_128466_)
    • getLongArray

      public long[] getLongArray(String p_128468_)
    • getCompound

      public CompoundTag getCompound(String p_128470_)
    • getList

      public ListTag getList(String p_128438_, int p_128439_)
    • getBoolean

      public boolean getBoolean(String p_128472_)
    • remove

      public void remove(String p_128474_)
    • toString

      public String toString()
      Specified by:
      toString in interface Tag
      Overrides:
      toString in class Object
    • isEmpty

      public boolean isEmpty()
    • createReport

      private CrashReport createReport(String p_128373_, TagType<?> p_128374_, ClassCastException p_128375_)
    • copy

      public CompoundTag copy()
      Specified by:
      copy in interface Tag
    • equals

      public boolean equals(Object p_128444_)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • writeNamedTag

      private static void writeNamedTag(String p_128369_, Tag p_128370_, DataOutput p_128371_) throws IOException
      Throws:
      IOException
    • readNamedTagData

      static Tag readNamedTagData(TagType<?> p_128414_, String p_128415_, DataInput p_128416_, NbtAccounter p_128418_)
    • merge

      public CompoundTag merge(CompoundTag p_128392_)
    • accept

      public void accept(TagVisitor p_177857_)
      Specified by:
      accept in interface Tag
    • entries

      protected Map<String,Tag> entries()
    • accept

      Specified by:
      accept in interface Tag