Another interesting environment to explore related to Minecraft is an open-source clone of that game: Minetest [1].
It allows extensions in the form of Lua scripts. There is an extension [2] that opens up a TCP socket which can be used to modify the environment in any language across the network. There is an accompanying Python library [3] that is quite accessible (I had to use the 2to3 tool to seamlessly convert it to Python 3 because of some dependency problem).
I've been trying to get it to work in WebAssembly (some notes here [4]) and maybe connect Blockly / Scratch to it, but unfortunately the WebAssembly shared memory model is postponed due to the Spectre and Meltdown debacle [5].