
makecode
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.
过去,制作Minecraft Mod真是...充满挑战。 它是一系列JAR文件,Java hack和深层文件夹结构。 可能,但是那并不有趣,而且肯定也不容易。 我现在想回顾一下Minecraft可以从Windows应用商店轻松安装的情况。
Today, it couldn't be easier to make a Minecraft Mod, so I know what my kids and I are doing tonight!
今天,制作Minecraft Mod并非易事,所以我知道我和我的孩子今晚在做什么!
I headed over to https://minecraft.makecode.com/setup/minecraft-windows10 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!
我前往https://minecraft.makecode.com/setup/minecraft-windows10,并按照说明进行操作。 我已经安装了Minecraft ,因此我只需要安装Minecraft Code Connection应用程序。 这里的架构非常干净和聪明。 基本上,您可以在Minecraft中启用作弊功能,并在Code Connection应用程序和Minecraft之间使用本地websockets连接-您可以通过外部应用程序自动执行Minecraft!
Here I'm turning on cheats in a new Miencraft world:
在这里,我开启了一个新的Miencraft世界的作弊技巧:

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.
然后从Code Connection应用程序中,获得自动化服务器的URL,然后返回Minecraft,单击“ t”并将其粘贴到URL中。 现在,两个应用程序正在互相交谈。

I can automate with MakeCode, Scratch, or other editors. I'll do MakeCode.
我可以使用MakeCode,Scratch或其他编辑器进行自动化。 我会做MakeCode。

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.
然后打开一个编辑器。 这与今年早些时候为Adafruit Circuit Playground Express进行编码时使用的基本开源Make Code编辑器相同。
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.
现在,我将在“生成代码”中设置一个聊天命令,当我输入聊天命令“鸡”时,它会变成雨鸡。 它运行一个循环,并在我的角色的头部上方10个街区处产卵100只鸡。

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.
我真的很惊讶这有多么容易。 从头到尾大概需要10分钟,这比我几年前学到的Java插件要容易得多。

There are a ton of tutorials here, including Chicken Rain. https://minecraft.makecode.com/tutorials
这里有很多教程,包括Chicken Rain。 https://minecraft.makecode.com/tutorials
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!
我最高兴向我的孩子们展示的那个是特工。 您与远程代码连接应用程序的连接包括图形表达或“代理”。 就像Logo(记住,机器人乌龟?)一样,您可以控制您的代理并让他建造东西。 不再为我们准备乏味的房屋! 让我们循序渐进地实现荣耀,教杜德如何使我们成为一座城堡!
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.
赞助商:使用Code Vision,重命名项目重构和Assembly Explorer,获取最新的JetBrains Rider 。 包括对C#, VB.NET ,F#,TypeScript和Angular的改进支持。
makecode