22declare(strict_types=1);
44 public const TAG_End = 0;
45 public const TAG_Byte = 1;
46 public const TAG_Short = 2;
47 public const TAG_Int = 3;
48 public const TAG_Long = 4;
49 public const TAG_Float = 5;
50 public const TAG_Double = 6;
51 public const TAG_ByteArray = 7;
52 public const TAG_String = 8;
53 public const TAG_List = 9;
54 public const TAG_Compound = 10;
55 public const TAG_IntArray = 11;
63 return ByteTag::read($reader);
65 return ShortTag::read($reader);
67 return IntTag::read($reader);
69 return LongTag::read($reader);
71 return FloatTag::read($reader);
72 case self::TAG_Double:
73 return DoubleTag::read($reader);
74 case self::TAG_ByteArray:
75 return ByteArrayTag::read($reader);
76 case self::TAG_String:
77 return StringTag::read($reader);
79 return ListTag::read($reader, $tracker);
80 case self::TAG_Compound:
81 return CompoundTag::read($reader, $tracker);
82 case self::TAG_IntArray:
83 return IntArrayTag::read($reader);
static createTag(int $type, NbtStreamReader $reader, ReaderTracker $tracker)