Lesson 9: Teleportation

Instant teleportation!!


We will use a new python code to instantly change our minecraft player’s position!


# TELEPORT
import mcpi.minecraft as minecraft
import mcpi.block as block
mc = minecraft.Minecraft.create()
playerPos = mc.player.getPos()
mc.player.setPos(playerPos.x,playerPos.y,playerPos.z+12)