internal override void Read(NBTStream stream) { this.ListTagType = (NBTTagType)stream.ReadByteTag(); for (int i = 0; i < stream.ReadIntTag(); ++i) { Tag tag = null; switch (this.ListTagType) { case NBTTagType.BYTE: tag = new ByteTag(0); break; case NBTTagType.SHORT: tag = new ShortTag(0); break; case NBTTagType.INT: tag = new IntTag(0); break; case NBTTagType.LONG: tag = new LongTag(0); break; case NBTTagType.FLOAT: tag = new FloatTag(0); break; case NBTTagType.DOUBLE: tag = new DoubleTag(0); break; case NBTTagType.BYTE_ARRAY: tag = new ByteArrayTag(new byte[0]); break; case NBTTagType.STRING: tag = new StringTag(""); break; case NBTTagType.LIST: tag = new ListTag(NBTTagType.END); break; case NBTTagType.COMPOUND: tag = new CompoundTag(); break; case NBTTagType.INT_ARRAY: tag = new IntArrayTag(new int[0]); break; case NBTTagType.LONG_ARRAY: tag = new LongArrayTag(new long[0]); break; default: throw new NotSupportedException(); } tag.Read(stream); this.Tags.Add(tag); } }