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

22 lines
407 B
Python

from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import time
heights = [100, 0]
count = 0
while count < 10:
pos = mc.player.getTilePos()
if pos.y < heights[0]:
heights[0] = pos.y
elif pos.y > heights[1]:
heights[1] = pos.y
count += 1
time.sleep(1)
mc.postToChat("Nizshaa pozicia: " + str(heights[0]))
mc.postToChat("Vissaa pozicia: " + str(heights[1]))