Beispiel #1
0
        internal override bool ReadTag( NbtBinaryReader readStream )
        {
            int length = readStream.ReadInt32();
            if( length < 0 ) {
                throw new NbtFormatException( "Negative length given in TAG_Byte_Array" );
            }

            if( readStream.Selector != null && !readStream.Selector( this ) ) {
                readStream.Skip( length );
                return false;
            }
            Value = readStream.ReadBytes( length );
            return true;
        }