“Mom, I don’t want to eat right now; a Wither killed my character and I have to rebuild everything!”
Does this sound familiar? Don’t worry – you’re not alone! Does your child play Minecraft for hours on end, and when not playing, does she watch videos of YouTube personalities playing the Minecraft game? Ever ask yourself how you can turn your child’s Minecraft time into something productive that might even give your child skills that can last a lifetime?
“Modding”, or modifying the source code of Minecraft, is all the rage with young Minecrafters worldwide. In fact, an entire industry has grown up around YouTube personalities like Mr Sparklz and others who make millions in Google royalties for videos in which they review Minecraft Mods.
Modding also has another use, and we think it’s the key to making Minecraft time productive. By modding Minecraft, children as young as seven can learn to code using the Java programming language. Normally kids coding courses have used drag and drop interfaces, or at best closed platforms using the “Hello World” method in which kids get to print “Hello World” on a screen. For young kids, this gets boring quickly, and they will often fall away from computer programming sometimes permanently.
While modding with Java, kids learn to create their own custom pickaxes, their own enemies, or their own dimensions. They can use Java coding to give their creations special properties and then try out their creation in the game that they love to play. The “Ah Ha” moment in which a child plays with her mod in the game is a marvel to see, and we’ve found that once kids experience it, they want to learn more. Modding provides children with the additional motivation and persistence required to overcome common occurrences in programming – bugs, exceptions, and other technical glitches.
What coding concepts can my student learn from Minecraft?
Since Minecraft is written in Java, your student will gain exposure to one of the most popular programming languages in the world. The following are some basics of Java (most concepts are universal) that are simple and easy to understand, but can help your child create endless numbers of amazing mods.
Conditional statements allow a program to execute a certain piece of code based on a decision. Java uses boolean variables to evaluate these conditions. One of two boolean values (True or False) is returned when an expression is compared or evaluated. An example in English could be “ If this statement is true, then the following command will occur”.
Here is a snippet of code that sets a daytime or nighttime texture depending upon the time of day in Minecraft:
As you can see, if it is daytime, the computer is told to use a texture to make the Minecraft world appear as though it is daytime (sun, visible clouds, shadows, etc). If it is not daytime (indicated by the “else” command), the computer will use a nighttime texture.
Another coding concept that can be learned through modding is called “the Loop”. In this example, a “While Loop” continually executes a command while a particular condition is true, and discontinues the command when the command is not longer true.
Here is an example of how a While Loop might appear in Java for Minecraft:
In this loop, a player will be able to fire arrows as long as the number of arrows in her arsenal is greater than zero. Once the number of arrows reaches zero, the condition becomes false (because the number of arrows is not greater than zero) and no arrows are fired.
There are a number of other key coding concepts that are encountered during modding, including methods, variables, arrays, switch statements, and more. Each provides children with a hands on experience using concepts that are used in hundreds of programming languages to make websites, games, apps, and more.
My child is only seven; isn’t that a little young to learn programming?
In our experience, seven is not too young. Although the content might be initially complex, there are many concepts that can be grasped by elementary school students that will give them the foundation necessary to learn more complex code later on.
Here are a few free and paid options that can help teach your student to learn Java through modding Minecraft:
Minecraft Modding for Kids for Dummies – Modding instructions for beginners
Minecraft Mods: 51 mods to make Minecraft Great Again– List and instruction of 51 mods to make on Minecraft.
Absolute Beginners Guide to Minecraft Mods Programming– A how-to best learn Java to mod Minecraft
EMX Tutorials – Modding Tutorials for beginners through advanced
Mr.Crayfish – Series of Youtube videos that have step by step instruction on setting up and making mods.
CodaKid’s Minecraft Modding Foundations – We are tooting our own horn here, but we believe that this is the most academic Minecraft Modding course available (and also super-fun).