internal override void WriteBinary(NBTBinaryWriter bw) { bw.Write(_value.Length); for (int i = 0; i < _value.Length; i++) { bw.Write(_value[i]); } }
public static void WriteNamedTag(TagBase tag, NBTBinaryWriter bw) { byte tagId = (byte)tag.TagType; bw.Write(tagId); if (tagId != 0) { bw.Write(tag.Name); tag.WriteBinary(bw); } }
internal override void WriteBinary(NBTBinaryWriter bw) { if (_tagList.Count > 0) { _listTagType = _tagList[0].TagType; } else { _listTagType = TagType.Byte; } bw.Write((byte)_listTagType); bw.Write(_tagList.Count); foreach (TagBase nbt in _tagList) { nbt.WriteBinary(bw); } }
internal override void WriteBinary(NBTBinaryWriter bw) { foreach (TagBase value in _tagMap.Values) { WriteNamedTag(value, bw); } bw.Write((byte)0); }
internal override void WriteBinary(NBTBinaryWriter bw) { bw.Write(_value); }