Files
pythonmc/BookCraigRichardson/whileLoops/randomTeleportAdventure.py
BarsTigerMeowcat 8bed7171c2 Initial commit
2020-01-26 12:49:01 +02:00

18 lines
324 B
Python

from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import random
import time
count = 0
while count < 10:
x = random.randint(-1000, 1000)
y = random.randint(20, 90)
z = random.randint(-1000, 1000)
mc.player.setTilePos(x, y, z)
time.sleep(20)
count += 1
mc.player.setTilePos(68, 87, 333)