6.23 Minecraft & Python讲座回顾
及线上平台使用手册
2018年6月23日,翰林国际教育迎来了与Bigger Lab的首次合作讲座,为了各位学生家长深入了解计算机编程相关的Minecraft平台与编程语言Python系列讲座。非常感谢各位学生家长的关注和厚爱,特此将本次讲座的重点内容进行了回顾。本次回顾将分为两个部分,第一部分为讲座内容,第二部分为线上平台使用手册。
1. Minecraft & Python讲座回顾
Swift playgrounds 也能够控制机器人
用户可以使用swift playgrounds 直接控制机器人、无人机以及乐高的开发套件
A sandbox game has limitless possibilities, it allows you to make your own decisions
GAME - NASA, YOUTUBE, CIA
Other people’s work, we can just use the functions inside directly by importing the library
These coordinates are called x, y and z. You have to be careful when you talk about
coordinates in Minecraft; if you use words such as “left” and “right”, whether
something is left or right depends on which way you are facing in the Minecraft world.
x gets bigger as your player heads east, and smaller as you head west.
y gets bigger up in the sky, and smaller down into the ground.
z gets bigger as your player heads south, and smaller as you head north.
一本电子书 –有内容,章节目录。
同时他是一本可以互动,游戏,Coding,看到运行结果的书。而且开发者可以随心所欲写自己的书
一本电子书 –有内容,章节目录。
同时他是一本可以互动,游戏,Coding,看到运行结果的书。而且开发者可以随心所欲写自己的书
一本电子书 –有内容,章节目录。
同时他是一本可以互动,游戏,Coding,看到运行结果的书。而且开发者可以随心所欲写自己的书
Using for loop to do something for a given time
至此,今天的Minecraft-python讲座圆满完成啦!下面是各位学生家长的提问环节!
2. 线上平台的使用
下列指南可免费下载
下载链接请注册或登录后查看
Minecraft server信息
server1 minecraft-server 47.100.121.67:25565 对应IP (”localhost“,4711)或(”“,4711)
server2 minecraft-server 47.100.121.67:25566 对应IP (”localhost“,4712)或(”“,4712)
server3 minecraft-server 47.100.121.67:25567 对应IP (”localhost“,4713)或(”“,4713)
server4 minecraft-server 47.100.121.67:25568 对应IP (”localhost“,4714)或(””,4714)
线上平台使用指南
原版使用指南为pdf格式文件
推荐使用电脑下载
- 打开Minecraft平台,选择版本为1.9.2,之后选择多人游戏
- 根据学生数量情况,合理分配server使用(建议一个minecraft-server可以让1-5个minecraft客户端使用)
- 根据minecraft-server信息连接需要的服务器
- 用浏览器打开create.biggerlab.com:3000(后续地址会更改,会随时更新)
- 第一次登陆可以创建账户登陆。
- 登陆后在编辑器页面
- 需要在代码中添加IP地址
- 将mc = minecraft.Minecraft.create()改成mc = minecraft.Minecraft.create(”localhost“,4711)
- 备注:不同的sever的ip地址会不同,具体参见表头server信息。
- 待代码编辑完成后,点击Run Script ,返回Mincecraft客户端就可以看到你建造的
Iron Golem Python代码
下载链接为ZIP压缩格斯,内含原版python格式代码
可下载后使用text打开
推荐使用电脑下载
完成版代码如下方所示:
import time
import mcpi.minecraft as minecraftTNT = 46
#underscore
SNOW_BLOCK = 80
PUMPKIN = 86
IRON_BLOCK = 42mc = minecraft.Minecraft.create(address = "localhost", port = 4713)
myId = mc.getPlayerEntityId("test_biggerlab")pos = mc.entity.getTilePos(myId)
# pos.x, pos.y, pos.z
x = pos.x+3
y = pos.y
z = pos.z# teacher said:"the PE class is cancelled"
mc.postToChat("Hello World")# camelCase
# goToThePark
# for i in range(10):
# mc.setBlock(x, y, z, SNOW_BLOCK)
# mc.setBlock(x, y+1, z, SNOW_BLOCK)
# mc.setBlock(x, y+2, z, PUMPKIN)
# Welcome to BiggerLab's Minecraft Python Editorfor i in range(100):
mc.setBlock(x, y, z, IRON_BLOCK)
mc.setBlock(x, y+1, z, IRON_BLOCK)
mc.setBlock(x+1, y+1, z, IRON_BLOCK)
mc.setBlock(x-1, y+1, z, IRON_BLOCK)
mc.setBlock(x, y+2, z, PUMPKIN)
x = x+4
time.sleep(2)
# x += 4
欢迎了解更多翰林国际教育与Bigger lab的合作项目
点击下方链接即可浏览