
Scripting API now in public beta - 20years
https://minecraft.net/en-us/article/scripting-api-now-public-beta
======
orf
This kind of thing changes lives. I used to play a lot of counter strike
source. One day I found a server mod called EventScripts, and suddenly I could
make all kinds of crazy game modes on Python. I found I picked up this
programming thing pretty naturally, and without that mod I doubt I would have
even dabbled.

The feedback loop is phenomenal and is something you simply do not get with
other forms of learning. I really can't think of a better method and I'm so
excited the younger generation will be exposed to this.

Kudos Microsoft, I only wish it was done a bit quicker.

Edit: For anyone interested some tutorials are archived here:
[https://web.archive.org/web/20140810191103/http://python.eve...](https://web.archive.org/web/20140810191103/http://python.eventscripts.com/pages/My_Second_Addon).
Good times :)

~~~
blattimwind
Way back there used to be Metamod (which IIRC circumvented some limitation of
the Half-Life engine regarding how it loaded DLLs into the game), and then AMX
Mod layered on top of that, which was later replaced by AMX Mod X. This in
turn used a little programming language called "Pawn". You could then write
mods in Pawn, compile that to bytecode and dynamically load it into the game
server. Later there was Sourcepawn. These enabled a lot of complex mods, and
required relatively little knowledge about the messy details of the engines,
however it was still relatively involved. First you had to setup the various
base mods to get it to work, then you needed to compile your mods, restart the
game server for most changes etc.

~~~
paraboul
Fun fact, the creator of pawn / sourcemod was one of the guy working on the
JIT compiler of spidermonkey (js engine) @ Mozilla :
[https://www.bailopan.net](https://www.bailopan.net)

~~~
solarkraft
Lots of people that started out in game modding end up doing some really cool
stuff in other software fields too. The skill and motivation are transferable,
I suppose.

------
qwerty9876
This will get way more young kids interested in programming than all the
subsidized school programs combined, by the way

~~~
aviv
I don't understand what drives parents to want their kids to become code
monkeys. I would rather my kids be financially savvy and have business skills.
It sure doesn't hurt to know how to code, but getting them to program in
Python from age 10 does not make them entrepreneurs or creators of business
opportunities, it just makes them the labor workers of tomorrow.

~~~
texuf
That’s kind of like saying, “Teaching them to write just makes them the
scribes and court officials of tomorrow,” or, “Teaching them to add and
subtract makes them the bookkeepers and tax collectors of tomorrow.”

~~~
aviv
My issue is not with the _act_ of programming, just as I don't have an issue
with the act of writing something on a paper.

The issue is that the parents are doing this in order to set the kids up to a
career in programming, which IMO is going to be the blue collar work of their
future. There is no glory in being a code monkey 10 years from now... just a
decently paid blue collar worker making someone else rich.

Teach them the business skills that will enable them to properly hire and
evaluate 20 programmers for their business venture, not simply be one of those
20 programmers.

~~~
abraae
Another dad told me the same thing about my middle son 15 years ago. He was
guiding his own son to be a psychologist because he felt that off shoring was
going to remove all of the IT jobs in the developed world.

As it turns out he was wrong, my son's enjoying a great career as a
programmer, his son has left psychology and is doing some kind of creative
arts) music/digital career.

I think ultimately no one really knows what the future will hold, but it seems
that it can't be a bad thing having a strong familiarity with the modern day
building blocks of business, i.e software.

But i totally agree about arming them with business skills as well, so they
can step up to whatever the next step is.

~~~
lojack
My parents pushed me away from programming because they thought there was no
future and I’d hate it. I didn’t listen and it turns out they were wrong on
both counts. Now I can provide for my family, live comfortably, and I love the
work I do.

------
russellbeattie
I looked briefly but didn't see it - does Minecraft scripting have a way to
save state and reset to that state instantly, how about stepping through code
in real time? If not, most programs are just macros - they simply mimic user-
actions, and if somewhere along the script something doesn't go as planned,
it's just a mess. It's really hard teaching 10 year olds how to do anything
more than the basics if every time they run the program, their entire world is
messed up, and there's no way to undo the script they just ran, or understand
why it went wrong.

This has been true in Minecraft for years now, it'd be great if it were
addressed.

~~~
Scaevolus
They have in-game error messages and log files, or you can attach Visual
Studio's debugger.

[https://minecraft.gamepedia.com/Bedrock_Beta_Script_Document...](https://minecraft.gamepedia.com/Bedrock_Beta_Script_Documentation#Debugging)

~~~
solarkraft
Oh. Hello Windows lock-in.

------
tails4e
Does anyone know of a good guide to the Minecraft versions? My daughter wants
to get mods and maybe venture into scripting, but it seems confusing as to
what each version is capable of. We have it on Xbox and android but it seems
none of this works on those. It seemd java edition is best; except this has
now been replaced by win10 edition, but that does not support most mods or so
it seems. It's quite confusing so if anyone has a magic decoder ring for
versions/platforms/compatability I'd really appreciate the info!

~~~
shortercode
The Java edition is the only one that supports mods. Development is parallel
between it and the bedrock edition. The windows 10, android, iOS, Xbox one,
PS4 and switch versions all use the bedrock edition.

I would recommend starting with a premade mod pack and a YouTube series that's
currently using it. Direwolf20 authors his own packs and creates videos using
those packs. The twitch client allows you to install various modpacks for
Minecraft, including Direwolf20's

~~~
coredog64
A hearty second on Twitch. It’s very easy to go down the rabbit hole in
getting a mod working on your kid’s computer (what 3rd party API are they
using, what version, what mods do they build on, what version of Minecraft
does it work with, etc.).

------
danShumway
This is very cool, and very exciting.

My niece is really into Minecraft and has a huge interest in stuff like
robotics and programming, I think in no small part because of Minecraft's
influence. But because she's on the Windows 10 version it's difficult for me
to help her with anything. Better, more open modding tools for Bedrock means
that it's easier for me to show her stuff and pique her interest towards
developing more interesting customizations.

Now if only I didn't have to set up a Windows VM to run Bedrock...

~~~
destruc7i0n
There's a GitHub project which uses the Android version of Bedrock and runs it
"natively" on Linux/Mac/etc. systems, works pretty well too
[https://github.com/minecraft-linux/mcpelauncher-
manifest/wik...](https://github.com/minecraft-linux/mcpelauncher-
manifest/wiki)

While the scripting API isn't yet available for Android, I found it much
faster personally than running with Parallels and the like

------
brink
Very exciting, should put a fresh breath of life into Minecraft for sure.

It looks like it's only available for Bedrock edition currently. What about
Java edition? Is this Microsoft making an attempt to make the Java edition
obsolete?

~~~
ergothus
> should put a fresh breath of life into Minecraft for sure

If you mean "new options from a different group", then yes.

If you mean "Minecraft has gotten stale and this will pep it up", then no.
Minecraft has a very health and active modding community that has really been
exploring new directions lately, and the non-modded Minecraft has been
continuing to push new options and directions for some time.

> Is this Microsoft making an attempt to make the Java edition obsolete?

I expect they don't have to "attempt" so much as just let it decay because
they'll have a lot more non-Java resources. As much as I've trashed MS in the
past and as much as I thought the Minecraft buyout would be bad for Minecraft,
MS has really been a decently-behaved corp citizen in software of late and
developments like this mean that while they might under-support the Java
Edition, they'll continue to support Minecraft in some form as we've come to
expect.

~~~
rrrttrrr
Java has a massive inertia advantage in modding, which is pretty important in
my opinion because modders are the largest playerbase that will stick with
your game for a very, very long time. Additionally, modders have been known to
stick to old versions of minecraft for a long time, so new features/tooling
likely won't sway them. I expect the java edition to remain the most popular
version for a very long time.

~~~
calibas
That whole system is really a mess, and I speak from experience as a modder.
All the changes between MC releases makes updating an enormous pain in the
butt, so there's still mods stuck at version 1.6.4 and every version in
between.

I think most modders would be ecstatic at some kind of official mod support,
assuming it offers at least what forge does already.

------
3jckd
Fully-fledged DnD session in Minecraft anyone?

------
danielvf
Note that release only gives you an API to some UI elements and to entities
(animals, monsters). This is not yet a full Bedrock API and the number of
things you can do is currently quite limited.

Nice to see a start though!

------
Waterluvian
Are there typescript typings anywhere? Might be a great toy to play with this
Christmas and get more experience with TS.

------
Scaur
I got my start in programming basically via Minecraft. Multiplayer servers
taught me DNS, ports, & bash... modding on Mac OSX & configuring a server to
work with the same mod (Flan's Mod) taught me basic client-server
principles... hell, even Buycraft fuelled my interest in Bitcoin and web
development. I don't know if I'd even have been a serious developer at all if
it wasn't for Minecraft.

And now kids have access to learning JS directly. This is 100x as powerful as
learning how to web inspector pages. I look forward to watching my little
cousins surpass me.

------
rauhl
Well, it definitely sounds neat, and although I really wish it weren’t
JavaScript, that’s actually a pretty good choice based on popularity. Pity it
couldn’t have been TCL, Lisp, or even Scheme or Python.

I can’t wait until the modding community picks this up and figures out how to
integrate it. Gonna be fun times ahead, no doubt!

As an aside, this was a bit of a surprise to me:

> you can learn more about how to sign up for that beta by clicking this line
> of green text

Link. _Link_. Doesn’t _everyone_ know what a link is, these days?

~~~
vtesucks
I like your list but its missing the one language that I feel is most suited-
Lua.

~~~
umvi
Do we really want kids' first experience with programming to be a language
with 1-indexed arrays? That's just going to set them up for failure ;)

------
carlosdp
Oh this is actually really cool, especially because the lightweight nature of
JS and the way this is designed means plugin experiences are more plug-and-
play when you join a modded server, rather than having to have a plugin pre-
installed or having a download time when joining the server.

------
subless
As soon as I think Minecraft is old news something like this pops up. Seems
very interesting.

------
VanHallman
The very first mod for this should be someone to convince Mr Crayfish to
donate his Furniture Mod to the public domain (if it isnt there already) so
that it can be ported to the Bedrock editions!

------
phodo
Kudos to Microsoft. This can also open up new opportunities for AI
simulations, especially reinforcement learning. Similar to OpenAI. It should
unleash a new playground for progress.

------
pdyck
Trying to write mods for Minecraft is what got me into programming as a
teenager, this looks really cool!

------
ilaksh
It would be interesting to see a comparison between this API and what Java
mods are capable of doing.

------
benbristow
Looks like the JavaScript API is ES5. Wonder if they've any plans to support
ES6+?

~~~
snek
They're using ChakraCore, with support for ES6+. you can use all your
favourite `const` and `let` and `function*` etc.

~~~
edwinyzh
Glad to hear that!

------
ru999gol
far too limited and around 5 years to late

[https://minecraft.gamepedia.com/Mods/Forge](https://minecraft.gamepedia.com/Mods/Forge)

