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(); } }
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); } }
public override void ReadPayload(NBTStreamReader reader) { Value = reader.ReadInt(); }
public override void ReadPayload(NBTStreamReader reader) { int length = reader.ReadInt(); Value = reader.Read(length); }