def create_arch(playerInfo, turtleX, turtleY, turtleZ, archX): currentPlayerPosition = playerInfo[0].entity.getPos(playerInfo[1]) skippy = MinecraftTurtle(playerInfo[0], currentPlayerPosition) skippy.penblock(block.SNOW_BLOCK.id, 1) skippy.speed(10) skippy.setposition(turtleX + archX - 1, turtleY, turtleZ - 1) skippy.up(90) skippy.forward(8) skippy.down(90) skippy.right(90) skippy.forward(11) skippy.down(90) skippy.forward(8) skippy.up(180) skippy.forward(8)
# Connect to minecraft server 127.0.0.1 as player 'steve' mc = minecraft.Minecraft.create(address="127.0.0.1", name="steve") # get players position pos = mc.player.getPos() # create minecraft turtle turtle = MinecraftTurtle(mc, pos) turtle.speed(0) turtle.penblock(block.WOOL.id, 14) S = 50 for j in range(0, 20): turtle.up(j * 10) turtle.forward(S) turtle.left(90) turtle.down(j * 10) turtle.forward(S) turtle.left(90) turtle.down(j * 10) turtle.forward(S) turtle.left(90) turtle.up(j * 10) turtle.forward(S) turtle.left(90) turtle.left(10)
from mcpi.minecraft import * from mcpi.block import * from minecraftstuff import MinecraftTurtle mc = Minecraft.create() pos = mc.player.getTilePos() pos.y += 1 turtle = MinecraftTurtle(mc, pos) turtle.forward(5) turtle.right(90) turtle.forward(5) turtle.right(90) turtle.forward(5) turtle.right(90) turtle.forward(5)
from minecraftstuff import MinecraftTurtle from mcpi import minecraft from mcpi import block # Connect to minecraft server 127.0.0.1 as player 'steve' mc = minecraft.Minecraft.create(address="127.0.0.1", name="steve") # get players position pos = mc.player.getPos() # create minecraft turtle turtle = MinecraftTurtle(mc, pos) turtle.speed(0) turtle.setheading(90) NumberOfSides = 5 Angle = 360 / NumberOfSides SideLength = 20 WoolColour = 0 for count in range(24): for side in range(NumberOfSides): turtle.forward(SideLength) turtle.right(Angle) turtle.right(15) WoolColour += 1 if WoolColour > 15: WoolColour = 0 turtle.penblock(block.WOOL.id, WoolColour) # go 3d # turtle.sety(turtle.position.y + 1)
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) #орога diamond.setx(201) diamond.sety(71) diamond.setz(102) diamond.speed(10) diamond.penblock(152) diamond.forward(5) #diamond.left(90) diamond.up(35)# вверх diamond.forward(10) diamond.right(90) diamond.forward(7) diamond.right(90) diamond.forward(15) diamond.down(35)# ровно diamond.down(35)#вниз diamond.forward(34) diamond.right(90) diamond.up(35)# ровно diamond.up(35)# вверх
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(0) diamond.sety(56) diamond.setz(-47) diamond.left(90) diamond.penblock(50) diamond.forward(51)
from minecraftstuff import MinecraftTurtle from mcpi import minecraft # Connect to minecraft server 127.0.0.1 as player 'steve' mc = minecraft.Minecraft.create(address="127.0.0.1", name="steve") # get players position pos = mc.player.getPos() # create minecraft turtle turtle = MinecraftTurtle(mc, pos) turtle.speed(10) # draw a square turtle.forward(10) turtle.right(90) turtle.forward(10) turtle.right(90) turtle.forward(10) turtle.right(90) turtle.forward(10) # draw a square on the floor turtle.walk() turtle.forward(11) turtle.right(90) turtle.forward(10) turtle.right(90) turtle.forward(10) turtle.right(90)
from minecraftstuff import MinecraftTurtle import mcpi.minecraft as minecraft import mcpi.block as block # connect to minecraft mc = minecraft.Minecraft.create() pos = mc.player.getTilePos() print(pos) # create minecraft turtle steve = MinecraftTurtle(mc, pos) # tests # draw a pentagon at different speeds steve.forward(5) steve.right(72) steve.speed(8) steve.forward(5) steve.right(72) steve.speed(10) steve.forward(5) steve.right(72) steve.speed(0) steve.forward(5) steve.right(72) steve.forward(5) # change pen steve.penblock(block.WOOL.id, 0) # backward steve.speed(6)
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(181) diamond.sety(65) diamond.setz(68) diamond.up(34) diamond.speed(10) dlina = 150 #ступеньки diamond.penblock(89) diamond.forward(dlina) #факела diamond.setposition(181, 66, 68) diamond.penblock(50) diamond.forward(dlina) #воздух diamond.setposition(181, 67, 68) diamond.penblock(0) diamond.forward(dlina)
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(177) diamond.sety(69) diamond.setz(78) diamond.speed(10) diamond.penblock(152) diamond.forward(1000) diamond.left(180) diamond.sety(70) diamond.penblock(27) diamond.forward(1000)
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(144) diamond.sety(65) diamond.setz(126) diamond.left(90) diamond.left(90) diamond.penblock(133) diamond.forward(9) diamond.left(90) diamond.forward(1) diamond.left(90) diamond.forward(9)
# These two lines are because of the folder the demos are located in, and aren't normally necessary import os.path, sys sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) # Minecraft Turtle Example - Crazy Pattern from minecraftstuff import MinecraftTurtle from mcpi import minecraft from mcpi import block # Connect to minecraft server 127.0.0.1 as player 'steve' mc = minecraft.Minecraft.create(address="127.0.0.1", name="steve") # get players position pos = mc.player.getPos() # create minecraft turtle turtle = MinecraftTurtle(mc, pos) turtle.penblock(block.WOOL.id, 11) turtle.speed(10) for step in range(0, 50): turtle.forward(50) turtle.right(123)
# These two lines are because of the folder the demos are located in, and aren't normally necessary import os.path, sys sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) #Minecraft Turtle Example - Circle from minecraftstuff import MinecraftTurtle from mcpi import minecraft # Connect to minecraft server 127.0.0.1 as player 'steve' mc = minecraft.Minecraft.create(address="127.0.0.1", name="steve") # get players position pos = mc.player.getPos() # create minecraft turtle turtle = MinecraftTurtle(mc, pos) turtle.speed(10) for step in range(0, 100): turtle.right(5) turtle.forward(2)
from mcpi.minecraft import Minecraft from mcpi import block from minecraftstuff import MinecraftTurtle mc = Minecraft.create() pos = mc.player.getTilePos() # create minecraft turtle steve = MinecraftTurtle(mc, pos) # draw a pentagon steve.forward(5) steve.right(72) steve.forward(5) steve.right(72) steve.forward(5) steve.right(72) steve.forward(5) steve.right(72) steve.forward(5)
import path_helper from mcpi.minecraft import Minecraft from minecraftstuff import MinecraftTurtle # connect to minecraft mc = Minecraft.create() pos = mc.player.getTilePos() print(pos) # create minecraft turtle turtle = MinecraftTurtle(mc, pos) # tests # draw a pentagon at different speeds turtle.forward(5) turtle.right(72) turtle.speed(8) turtle.forward(5) turtle.right(72) turtle.speed(10) turtle.forward(5) turtle.right(72) turtle.speed(0) turtle.forward(5) turtle.right(72) turtle.forward(5) # change pen turtle.penblock("white_wool") # backward
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(201) diamond.sety(71) diamond.setz(102) diamond.speed(10) diamond.penblock(152) diamond.forward(5)
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(201) diamond.sety(71) diamond.setz(102) diamond.speed(10) diamond.penblock(152) diamond.forward(5) #diamond.left(90) diamond.up(35) diamond.forward(10) diamond.right(90) diamond.forward(7) diamond.right(90) diamond.forward(15) diamond.down(35) diamond.forward(15) diamond.left(180) diamond.sety(89) diamond.penblock(27) diamond.forward(217) diamond.right(90) diamond.forward(1468)
from mcpi.minecraft import Minecraft from time import sleep from random import randint from minecraftstuff import MinecraftTurtle print("hi ok") mc = Minecraft.create() diamond = MinecraftTurtle(mc) diamond.setx(177) diamond.sety(88) diamond.setz(79) diamond.speed(10) diamond.penblock(152) diamond.forward(1468) diamond.left(90) diamond.forward(217) diamond.left(180) diamond.sety(89) diamond.penblock(27) diamond.forward(217) diamond.right(90) diamond.forward(1468)