Terraria is loads of fun, but only for a while. Once you reach the end, there's absolutely no replay value. The same goes for playing online. They plan to release more content, but that will only last so long.
Minecraft has more replay value, but it depends on you. If you don't want to build stuff, you'll get bored fairly soon. If you do have the drive, then you can have fun forever. Also, minecraft multiplayer holds up longer over time, and there are loads of mods available.
If you get minecraft and feel like playing online, check out escapecraft [http://www.escapecraft.net/]. It's a great server to play on.