Initial commit
This commit is contained in:
17
BookCraigRichardson/whileLoops/randomTeleportAdventure.py
Normal file
17
BookCraigRichardson/whileLoops/randomTeleportAdventure.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user