Good afternoon, dear readers!
We have the second edition of a wonderful
book about the game world of Minecraft. We have already published a separate
post about it.

')
We are pleased to remind you that all ages are obedient to this game, moreover, it will be interesting even for preschool children, if you correctly give the meaning of this wonderful game and awaken the creative spirit in children. Under the cut - the story of many mothers about how this is done.
Finally, if you are interested in the translation of Walter Higgs’s introductory publication on ScriptCraft, which the author refers to at the very end of the article - write, discuss :)
If you, like me, have small children aged 5-10 years, then you probably know firsthand about the universal hobby of Minecraft; Perhaps you even have books and toys on this subject. I began to ponder whether this game of cubes could teach your children something and decided to tell you how to captivate children by programming Minecraft. We have already tried to learn to program on
Scratch , but children like Minecraft even more than this language. So I decided to build on Minecraft.
Where to beginInstallationJust this case, I decided not to deal with children. They are small, and I wanted to make it so that we could focus on the “most interesting”, so that the children would immediately receive a “return” from programming, rather than doing boring tuning before they could start programming. It’s good that I did just that: during the installation, there were some quirks that could well spoil the mood of the children. By the way, we worked on a Mac.
Prerequisites- When installing, use a normal (normal) account. At first I tried to work with the child’s account, activating parental control on it. Unfortunately, in this case, not only the capabilities of Minecraft itself are limited, but also the set of command line calls that may be needed is shrinking. This account does not require administrative rights.
- Install the full client version of Minecraft. Since children often play Minecraft Pocket Edition (PE) on iPads, we did not immediately realize that this version does not allow us to connect to the modified Minecraft server, which we did with CanaryMod. The client version can be purchased on the Minecraft website . Be sure to pick a strong password.
- Install Java if you have not already done so. Without Java, you will not be able to work with the modified server.
- Finally, links: make sure that the versions you work with are compatible with each other, otherwise the ScriptCraft plugin will not load correctly.
This is what I worked with:
StartedIt is necessary to learn: if you are required to "start the server", it means the following:
- Open terminal
- Change directory
- Enter
java -jar CanaryMod-1.2.0_0.jar
If everything works correctly, then you should see the following:

Please note: if you have installed the ScriptCraft plugin correctly, you should also see “Found 1 plugin”.
The status is completed with a command line prompt for the production server. To exit the server gently when done, go back to the terminal and just type “stop”. If you do not do this and close the terminal window, or press Ctrl-Z, then the corresponding Java process will hang on the port where CanaryMod was launched - by default 25565. In this case, you will have problems as soon as you try to restart server.
Minecraft NavigationIf you do not play Minecraft regularly (not like me), then make sure you know how to use the navigation in the game.
The only question that I did not find the answer in online tutorials and with a simple Google search was how to open the door without destroying it. In the end, I adapted to pave the way with Ctrl + click. Then you can not demolish the beautiful doors of houses and other buildings :). It is strange that children preferred to break in everywhere without sparing the door. Hmmm ...
So let's goWhen you first launch the Minecraft client, set up a multiplayer mode (multiplayer). In the manuals, they write that the connection uses just “localhost”, but in fact you need to specify
localhost:, where port is either the default port for CanaryMod, that is, 25565, or another port that you could define in the CanaryMod configuration file.

Then try typing some text on the command line. Please note: the command line is both in the Minecraft client itself and in the terminal window from which you started the CanaryMod server. Sometimes it seems that the client does not respond to all keystrokes. In this case, my elder likes to say “something is buggy”. In this case, you need to restart the Minecraft client, and sometimes even the CanaryMod server.
If you do not want to be distracted by all sorts of monsters and creatures trying to devour your character, immediately set such a game mode so that you can create. This can be done both in the configuration file
config file , and in the Minecraft command line, where you need to enter:
/gamemode c
/gamemode c
. In this case, you and your children can come to grips with programming and playing, rather than saving your character.
How to captivate childrenFirst, let's make sure ScriptCraft works:
/js 1 + 1
We start with an exercise in which we learn how to programmatically create blocks, for which a one-line call is applied:
/js box(5,3,2,4)

It turned out oak box with id 5, which is given the width, depth and height. It originated in the air, since we started from the point at which the cross-sight was.
The children immediately became interested in whether we could create animals here, for example, cows or horses:
/jsp spawn cow
/jsp spawn horse
These calls are different from what we did when creating blocks: they are preceded by / js, and not / jsp. Remember the op command? It allows you to make with the help of / js powerful challenges that should not be made available to all players.
If it starts to rain in the game world or it becomes dark, you can show the child the following fast commands that allow you to return to a fine sunny day:
/ time set 1000
/ weather clear
Parent DemoIt was not without difficulty that I managed to persuade the children to break away from playing Minecraft and to perform several simple exercises - in order to captivate them with programming. To do this, you need to carefully look at what children are doing in Minecraft, and tell them what things can be done much faster by writing just a couple of lines of code. Here are some guidelines for this:
Show how to create a cylinder from cake (cake blocks) using the cylinder function that takes the cake id, radius and height. My eldest daughter was delighted with the fact that in this square world you can make cylinders, and from the cake (id 92). She switched to survival mode with the command
game mode s
game mode s
and with appetite "ate" cakes, in Minecraft from this improves health. Oh, if in life, too, it was :)
/js cylinder(92, 5, 20)
Here's what happened (top view):

Create a house, then a set of houses, a fort and a castle. Do not forget to move the cross so that all these objects do not line up on each other.
/js cottage()
/js cottage_road()
/js fort()
/js castle()

Then show how to pitch one of these structures with slugs. The children suggested that if we do this, then our character will be able to have fun flying in the clouds and landing in a virtual house-trampoline. Slug blocks are mentioned in gamepedia, id 165.
You can even add a dance floor in one of the buildings:
/js dancefloor()

Free up large space to make it easier to place different structures on it. At first glance, it was not obvious how this is done, even having rummaged through various sites, I did not find a clear answer - except that this possibility was in the popular fashion WorldEdit. I did not dare to install an unfamiliar mod, but in the end I found some code in the folder with the ScriptCrafts plugin, which uses air blocks. Exactly, air blocks! So, let's go:
/js box(blocks.air, 50, 50, 50)

So you can clear a large space, but it will take up to a minute of time, so please be patient. The kids were in awe. But if in this area you have tall trees or mountains, then their tops can remain “floating” in the air. In this case, simply reapply the code or raise this area and rearrange the cross. Finally, we could just
set up a flat world on the server and experiment with it to begin with, but then it would be less interesting to play. Consider: if you set values ​​of 50 or more for these dimensions, you can easily crash the server.
So, I managed to thoroughly captivate the children, they began to ask what else can be done here. If you're also interested, it's time to meet other challenges and even try to create your own mod.
ScriptCraft home pageYour first Minecraft modScriptCraft API HelpScriptCraft introductory post