internal override void Write(NBTStream stream)
 {
     foreach (Tag t in this.tags.Values)
     {
         t.WriteTag(stream);
     }
     stream.WriteByte((byte)NBTTagType.END);
 }
Exemplo n.º 2
0
 internal override void Write(NBTStream stream)
 {
     stream.WriteByte((byte)this.ListTagType);
     stream.WriteInt(this.Tags.Count);
     for (int i = 0; i < this.Tags.Count; ++i)
     {
         this.Tags[i].Write(stream);
     }
 }
        internal override void WriteTag(NBTStream stream)
        {
            int len = this.Data.Length;

            if (this.Name != null)
            {
                stream.WriteByte((byte)this.TagType);
                stream.WriteString(this.Name);
                stream.WriteInt(len);
                for (int i = 0; i < len; ++i)
                {
                    stream.WriteByte(this.Data[i]);
                }
            }
            else
            {
                throw new NullReferenceException("Tag Name Null");
            }
        }
        internal override void Write(NBTStream stream)
        {
            int len = this.Data.Length;

            stream.WriteInt(len);
            for (int i = 0; i < len; ++i)
            {
                stream.WriteByte(this.Data[i]);
            }
        }
Exemplo n.º 5
0
 internal override void WriteTag(NBTStream stream)
 {
     if (this.Name != null)
     {
         stream.WriteByte((byte)this.TagType);
         stream.WriteString(this.Name);
         this.Write(stream);
     }
     else
     {
         throw new NullReferenceException("Tag Name Null");
     }
 }
Exemplo n.º 6
0
        internal override void WriteTag(NBTStream stream)
        {
            int len = this.Data.Length;

            if (this.Name != null)
            {
                stream.WriteByte((byte)this.TagType);
                stream.WriteString(this.Name);
                stream.WriteInt(len);
                stream.Reservation(len);
                stream.WriteBytes(this.Data);
            }
            else
            {
                throw new NullReferenceException("Tag Name Null");
            }
        }
Exemplo n.º 7
0
 internal override void Write(NBTStream stream)
 {
     stream.WriteByte(this.Data);
 }