There is also https://www.minetest.net/ . It's fully open source and free, and although it is written in C++ it has a Lua modding API with many mods. Minetest itself is just the engine with basic functionality such as terrain generation and basic physics. Mobs, and other things are added via mods. Mods can be installed manually or in-game from https://content.minetest.net/ .
The problem I had with Minetest, is that the base sandbox is quite boring and I think you're not supposed to be playing it on its own, but then when it comes to mods there is so much choice and I couldn't find a place to start from (something like: "if you are a beginner, start from these 5 mods"), so I don't know where to start from. Any suggestions?
FWIW, here're my recommended mods:
Basic gameplay: 3d armor, mobs_redo + mobs_monster
Logic: mesecons, more mesecone, digilines
Hard monsters: NSSM (not so simple mobs), dmob (dragons, etc) (both need mobs_redo)
Building more: Homedecor
There're also some read-made games. Mineclone 2 is pretty good.