Lesson 14: Climbing Walls

Automatic vine climber


Using Python we will now write code that places vines along the wall to escape the minecart tunnel.


#Auto Climber
import mcpi.minecraft as minecraft
import mcpi.block as block
import time
mc = minecraft.Minecraft.create()
mc.postToChat("Auto Climber: Active")
time.sleep(2)

while(True):
	playerPos = mc.player.getPos()
	mc.postToChat("Climb")
	mc.setBlock(playerPos.x,playerPos.y+1,playerPos.z,106,8)
	
	standBlock = mc.getBlock(playerPos.x,playerPos.y-1,playerPos.z)
	
	if standBlock == 98:
		break