internal override bool ReadTag(NbtBinaryReader readStream) { if (readStream.Selector != null && !readStream.Selector(this)) { readStream.ReadByte(); return false; } Value = readStream.ReadByte(); return true; }
internal override bool ReadTag(NbtBinaryReader readStream) { if (readStream.Selector != null && !readStream.Selector(this)) { readStream.ReadByte(); return(false); } Value = readStream.ReadByte(); return(true); }
void SkipValue() { // Make sure to check for "atValue" before calling this method switch (TagType) { case NbtTagType.Byte: reader.ReadByte(); break; case NbtTagType.Short: reader.ReadInt16(); break; case NbtTagType.Float: case NbtTagType.Int: reader.ReadInt32(); break; case NbtTagType.Double: case NbtTagType.Long: reader.ReadInt64(); break; case NbtTagType.ByteArray: reader.Skip(TagLength); break; case NbtTagType.IntArray: reader.Skip(sizeof(int) * TagLength); break; case NbtTagType.LongArray: reader.Skip(sizeof(long) * TagLength); break; case NbtTagType.String: reader.SkipString(); break; default: throw new InvalidOperationException(NonValueTagError); } atValue = false; valueCache = null; }
void SkipValue() { if (!atValue) { throw new NbtFormatException(NoValueToReadError); } switch (TagType) { case NbtTagType.Byte: reader.ReadByte(); break; case NbtTagType.Short: reader.ReadInt16(); break; case NbtTagType.Float: case NbtTagType.Int: reader.ReadInt32(); break; case NbtTagType.Double: case NbtTagType.Long: reader.ReadInt64(); break; case NbtTagType.ByteArray: reader.Skip(TagLength); break; case NbtTagType.IntArray: reader.Skip(sizeof(int) * TagLength); break; case NbtTagType.String: reader.SkipString(); break; default: throw new InvalidOperationException(NonValueTagError); } atValue = false; valueCache = null; }
internal override void SkipTag(NbtBinaryReader readStream) { readStream.ReadByte(); }
internal override void SkipTag( NbtBinaryReader readStream ) { readStream.ReadByte(); }
internal override void ReadTag(NbtBinaryReader readStream) { Value = readStream.ReadByte(); }