Can you hack passwords of your own accounts?

I have a minecraft account and i forgot the password and email i used for it. I tried to send a email that was attached to the username but the username wasn't found. The only solutions are to hack it, or buy a new one. But before I hack it, I want to make sure that its not illegal to hack your own accounts for their passwords. So, is it illegal to hack your own accounts?

I would contact the people you have the email through. You will probably jsut have to answer security questions. Or, you can contact mojang. ALWAYS save your passwords somewhere