OpenComputers has players build one or more machines (either "computers" which can't move, or "robots" which can) and then the conceit is those machines seem to run a primitive DOS^W [Edited: I think it's actually Linux?] with floppy disks (flying robots, but booted from floppy disks, hey it's only a game) and they can run Lua programs you write. This mod (OpenComputers II) is a "spiritual successor" to OpenComputers.

It's full blown Lua, albeit running on the imaginary computer inside Minecraft. You can write complex Lua programs, if you want to and know how, and they can cause say, your robot to fly around building things, or realise its battery is low and it should come back for more juice.

So yes.

[The Minecraft mod community has people come and go, and it's not at all uncommon for the idea behind a mod to long outlive the interest of the first person who implements it, so that both projects pass from one author to another and also new projects come along that do more or less the same thing but are being actively maintained while a previous project became moribund. Minecraft is great but it's not the whole world and people move on. So e.g. the vast number of different items in typical modded worlds are unwieldy with Minecraft's built in systems for crafting etc. but soon somebody invented "Too Many Items" a mod which provides an interactive interface to the list of all items. Successors have included: "Not Enough Items" (very famous) and "Just Enough Items" (popular today and so people just say e.g. "Recipe in JEI" and assume you'll know what they meant). OpenComputers II thus isn't as "inevitable" as something like Python 3 was where the existing maintainers are making another one, but it sounds like for your purposes the fact it's RISC-V isn't crucial so I'd stick with plain OpenComputers at least for now ]

OpenComputers is IMHO as a non-parent somewhat suitable for what you're talking about, but it really depends how much she likes Minecraft. The OpenComputers default is to give you a clunky Nano (I think) editor, if you love Minecraft you'll forgive that because hey it's inside Minecraft. But otherwise even at age six it might already be annoying that this text editor is so primitive, yet six year olds aren't going to have the patience to bootstrap themselves a full-blown Emacs, I don't have patience for that and I'm in my forties. So if that's becoming an obstacle, outweighing the fun of being inside Minecraft, a more conventional beginner's programming environment might be appropriate. (If it's just a minor annoyance it is possible to write code in a "real" editor on the big computer and copy-paste it into OpenComputers but I have not done that)

There are a few other mods that have ideas which are core to computing but don't directly teach programming, in particular Integrated Dynamics has some pretty fancy predicate building that feels to me like it would teach some fundamentals about logic and debugging logical systems (is there a Pig stood on this sensor? Is it a full-grown pig? Are there at least two other pigs in this pen? Then let's pick this pig up and send it to the other pen...), but it's not very near the start of ID's progression, so again if Minecraft isn't a big interest already she's unlikely to see the interesting bits before losing interest.