Scott Hanselman

Teaching Kids to Code with Minecraft Mods made easy using MakeCode and Code Connection

February 5, '19 Comments [7] Posted in Gaming | Musings
Sponsored By

Back in the day, making a Minecraft mod was...challenging. It was a series of JAR files and Java hacks and deep folder structures. It was possible, but it wasn't fun and it surely wasn't easy. I wanted to revisit things now that Minecraft is easily installed from the Windows Store.

Today, it couldn't be easier to make a Minecraft Mod, so I know what my kids and I are doing tonight!

I headed over to and followed the instructions. I already have Minecraft installed, so I just had to install the Minecraft Code Connection app. The architecture here is very clean and clever. Basically you turn on cheats in Minecraft and use a local websockets connection between the Code Connection app and Minecraft - you're automating Minecraft from an external application!

Here I'm turning on cheats in a new Miencraft world:

Minecraft Allow Cheats

Then from the Code Connection app, I get a URL for the automation server, then go back to Minecraft, hit "t" and paste it in the URL. Now the two apps are talking to each other.

Connecting Minecraft to MakeCode

I can automate with MakeCode, Scratch, or other editors. I'll do MakeCode.

Make Code is amazing

Then an editor opens. This is the same base open source Make Code editor I used when I was coding for an Adafruit Circuit Playground Express earlier this year.

Now, I'll setup a chat command in Make Code that makes it rain chickens when I type the chat command "chicken." It runs a loop and spawns 100 chickens 10 blocks above my character's head.

Chicken rain

I was really surprised how easy this was. It was maybe 10 mins end to end, which is WAY easier than the Java add-ins I learned about just a few years ago.

Minecraft Chicken Rain

There are a ton of tutorials here, including Chicken Rain.

The one I'm most excited to show my kids is the Agent. Your connection to the remote Code Connection app includes an avatar or "agent." Just like Logo (remember that, robot turtles?) you can control your agent and make him build stuff. No more tedious house building for us! Let's for-loop our way to glory and teach dude how to make us a castle!

Sponsor: Get the latest JetBrains Rider with Code Vision, Rename Project refactoring, and the Assembly Explorer. Improved support for C#, VB.NET, F#, TypeScript, and Angular is all included.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Saturday, 09 February 2019 12:04:59 UTC
Thanks Scott for sharing this! Just tried this with my kid, and it seems working, except one thing - the code on chat command is executed twice, for example a simple command to move forward 1 block runs twice and the agent is moving 2 blocks. Trying to figure this out, but with no results yet. Didn't you face with similar issue? (minecraft windows 10 edition v1.9.0, code connection v1.5.0)
Saturday, 09 February 2019 17:45:52 UTC
Dmitry, I'm seeing the same duplicate commands. Doing something awful with state variables works to hide the extra command:

let fdCalled = false
player.onChat("fd", function () {
fdCalled = !(fdCalled)
if (!(fdCalled)) {
agent.move(SixDirection.Forward, 3)

I'm also not getting console.log() to work. In the MakeCode simulator, you can navigate to core/helpers.ts and see the definition of console.log shims to minecraft::serialSendString, but when I try to use it I get "Program Error: Cannot read property 'serialSendString' of undefined"
Saturday, 09 February 2019 19:40:13 UTC
Carl, I was thinking about this workaround as well, but it's hard to explain this for the kid never saw the code before :)
Tuesday, 12 February 2019 03:39:18 UTC
I talked to the team and confirmed this is a bug and they know about it and it should be fixed ASAP in a minecraft update.
Scott Hanselman
Tuesday, 12 February 2019 14:40:06 UTC
it is very interesting and full of information
Friday, 15 February 2019 14:40:58 UTC
I am using Minecraft Windows 10 Edition v1.9.0, and Code Connection v1.50.
I am following the instructions above, as I did in Minecraft Windows 10 Edition v1.8.0 and Minecraft Windows 10 Edition v1.8.1.
When I try to connect with "/connect", I get this error: "Kan geen verbinding maken met server ws://" which translates to: "Can not connect to server ws://".
Any suggestions?
Rob Pastoor
Sunday, 17 February 2019 00:31:19 UTC
The Positive Effects of Reiki on the Human Body

Reiki is known for its positive effects about the human body.
However, a lot of people of those who have never yet experienced its power know very well what exactly Reiki does and what its results
are. If you are thinking about the way in which Reiki may help you,
then continue reading to see what Reiki can do for you, mind and soul.

1. Increases our bodies's capacity to heal itself. Normally,
our bodies features a defense system which functions good providing the Ki flow isn't
interrupted. When the Ki is no longer capable of flow through your body, illnesses and diseases can seem.
Reiki stimulates the flow of positive energy, thus
enabling the body to heal itself and fight the internal and external attacks better.

2. Cleans one's body coming from all toxins. Because it acts around the entire body, it's one of the few complete detox programs one can possibly follow.

In addition to that this doesn't involve refraining from food or other type of activity.
Yet, pessimism must be banned through the individual's mind as they may have a negative impact upon the procedure.

3. Promotes health, positive thoughts and relaxation. The principles of Reiki count on positive thinking, thus a reassurance and relaxation is induced to the individual.
By removing negative energy and promoting feeling of peace, the healing process will likely be easier and shorter, whatever the illness or disease from
which the person suffers.
4. Works about the gastrointestinal tract and raises
the benefic connection between every little thing an individual ingests, from
food and water to medicines and curative herbs.

Thus, it could be successfully used as being a complementary therapy for all those already taking medicine,
but concurrently it is ideal for maintain the average person's health in good parameters.

5. Works on personal feelings, helping people overcome negative experiences
off their lives and managing unexpected or unpleasant situations from other lives.
People with depressions, anxieties or struggling with stress are able to
see dramatic improvements of their conditions as soon as the Reiki sessions.

6. Makes the transition from life to death much easier.
It helps the soul transcend into immortality and the body feel less suffering from this transformation. This is
why many Reiki adepts utilize the Ki to create their transition in one world to a different smoother.

Reiki offers healing for all those varieties of bodily conditions, as well as for the spiritual problems.
It is like a closest friend for all those those people in need, however it may also relieve healthy
people from quotidian stress and problems.

You can read details here on website :
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, li, ol, pre, strike, strong, sub, super, u, ul) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.