time.sleep(5)
    roll = 0
    pitch = 0
    yaw = 0

    #angles = [15,30,45,60,75,90]
    angles = [45, 90]

    print("roll shape")
    for roll in angles:
        myShape.rotate(yaw, pitch, roll)
        print("roll shape {} done".format(roll))
        time.sleep(1)
    
    for pitch in angles:
        myShape.rotate(yaw, pitch, roll)
        time.sleep(1)

    for yaw in angles:
        myShape.rotate(yaw, pitch, roll)
        time.sleep(1)

    for count in range(0,5):
        myShape.moveBy(1,0,0)
        time.sleep(0.5)

    time.sleep(5)
finally:
    myShape.clear()

Пример #2
0
#create the shape object
bt = "diamond_block"
shapeBlocks = [
    ShapeBlock(0, 0, 0, bt),
    ShapeBlock(1, 0, 0, bt),
    ShapeBlock(1, 0, 1, bt),
    ShapeBlock(0, 0, 1, bt),
    ShapeBlock(0, 1, 0, bt),
    ShapeBlock(1, 1, 0, bt),
    ShapeBlock(1, 1, 1, bt),
    ShapeBlock(0, 1, 1, bt)
]

#move the shape about
myShape = MinecraftShape(mc, playerPos, shapeBlocks)
print("drawn shape")
time.sleep(10)
myShape.moveBy(-1, 1, -1)
time.sleep(1)
myShape.moveBy(1, 0, 1)
time.sleep(1)
myShape.moveBy(1, 1, 0)
time.sleep(1)

#rotate the shape
myShape.rotate(90, 0, 0)

#clear the shape
myShape.clear()
Пример #3
0
    time.sleep(5)
    roll = 0
    pitch = 0
    yaw = 0

    #angles = [15,30,45,60,75,90]
    angles = [45, 90]

    print("roll shape")
    for roll in angles:
        myShape.rotate(yaw, pitch, roll)
        print("roll shape {} done".format(roll))
        time.sleep(1)

    for pitch in angles:
        myShape.rotate(yaw, pitch, roll)
        time.sleep(1)

    for yaw in angles:
        myShape.rotate(yaw, pitch, roll)
        time.sleep(1)

    for count in range(0, 5):
        myShape.moveBy(1, 0, 0)
        time.sleep(0.5)

    time.sleep(5)
finally:
    myShape.clear()
Пример #4
-7
#test MinecraftShape
playerPos = mc.player.getTilePos()

#create the shape object
shapeBlocks = [ShapeBlock(0,0,0,block.DIAMOND_BLOCK.id),
                ShapeBlock(1,0,0,block.DIAMOND_BLOCK.id),
                ShapeBlock(1,0,1,block.DIAMOND_BLOCK.id),
                ShapeBlock(0,0,1,block.DIAMOND_BLOCK.id),
                ShapeBlock(0,1,0,block.DIAMOND_BLOCK.id),
                ShapeBlock(1,1,0,block.DIAMOND_BLOCK.id),
                ShapeBlock(1,1,1,block.DIAMOND_BLOCK.id),
                ShapeBlock(0,1,1,block.DIAMOND_BLOCK.id)]

#move the shape about
myShape = MinecraftShape(mc, playerPos, shapeBlocks)
print("drawn shape")
time.sleep(10)
myShape.moveBy(-1,1,-1)
time.sleep(1)
myShape.moveBy(1,0,1)
time.sleep(1)
myShape.moveBy(1,1,0)
time.sleep(1)

#rotate the shape
myShape.rotate(90,0,0)

#clear the shape
myShape.clear()