Are there limitations to what you can mod in minecraft?

Or can you pretty much just mod it until it's a entirely different game code by code.

No, there are no limitations to modding minecraft, people have modded it to where it went from a pixelated blocky world to looking like a blocky but hi definition looking game. And also modded it to be like pokemon or skyrim etc. The only limits depends on what you are capable of.

There's no limit, maybe till your hard drive fills.

Yes, until your game starts lagging xD

The only limitation is what your computer can handle. Many mods increase the processing demand on your computer, so too many and your computer will crash.

And there are mods that essentially completely re-code the game.