예제 #1
0
        public override void ReadPayload(NBTStreamReader reader)
        {
            int length = reader.ReadInt();

            Value = new int[length];
            for (int i = 0; i < length; i++)
            {
                Value[i] = reader.ReadInt();
            }
        }
예제 #2
0
        public override void ReadPayload(NBTStreamReader reader)
        {
            Clear();

            var type  = reader.ReadTagType();
            int count = reader.ReadInt();

            if ((type == TagType.End) && (Count > 0))
            {
                throw new InvalidDataException("List tag with ListType of 'End' isn't empty");
            }
            _tags.Capacity = count;

            _listType = ((Count > 0) ? type : default(TagType?));

            for (int i = 0; i < count; i++)
            {
                var tag = CreateTagFromType(type);
                tag.ReadPayload(reader);
                _tags.Add(tag);
            }
        }
예제 #3
0
 public override void ReadPayload(NBTStreamReader reader)
 {
     Value = reader.ReadInt();
 }
예제 #4
0
        public override void ReadPayload(NBTStreamReader reader)
        {
            int length = reader.ReadInt();

            Value = reader.Read(length);
        }