# Connect to minecraft server 127.0.0.1 as player 'steve'
mc = minecraft.Minecraft.create(address="127.0.0.1", name="steve")

mc.player.setPos(-25, 0, -25)

#clear area
mc.setBlocks(-25, 0, -25, 25, 25, 25, block.AIR.id)

#create drawing object
mcDrawing = MinecraftDrawing(mc)

#line
mcDrawing.drawLine(0, 0, -10, -10, 10, -5, block.STONE.id)

#circle
mcDrawing.drawCircle(-15, 15, -15, 10, block.WOOD.id)

#sphere
mcDrawing.drawSphere(-15, 15, -15, 5, block.OBSIDIAN.id)

#face - solid triangle
faceVertices = []
faceVertices.append(minecraft.Vec3(0, 0, 0))
faceVertices.append(minecraft.Vec3(5, 10, 0))
faceVertices.append(minecraft.Vec3(10, 0, 0))
mcDrawing.drawFace(faceVertices, True, block.SNOW_BLOCK.id)

#face - wireframe square - using Points
faceVertices = Points()
faceVertices.add(0, 0, 5)
faceVertices.add(10, 0, 5)
Ejemplo n.º 2
0
from minecraftstuff import MinecraftDrawing
from mcpi.minecraft import Minecraft
from mcpi import block

mc = minecraft.create()

pos = mc.player.getTilePos()

mcdrawing = MinecraftDrawing(mc)

mcdrawing.drawCircle(pos.x, pos.y + 15, pos.z, 10, 57)
from minecraftstuff import MinecraftDrawing
from mcpi.minecraft import Minecraft
from mcpi import block
#https://minecraft-stuff.readthedocs.io/en/latest/minecraftdrawing.html
## pip install minecraftstuff
#Connect to minecraft
mc = Minecraft.create()
# get the players position
pos = mc.player.getTilePos()

#Using the Minecraft Drawing API
mcdrawing = MinecraftDrawing(mc)


# draw a circle with a radius of 10 blocks
#mcdrawing.drawCircle(pos.x, pos.y + 15, pos.z, 10, block.WOOD.id)
mcdrawing.drawCircle(pos.x+10, pos.y+5, pos.z+10, 5, block.WOOD.id)
Ejemplo n.º 4
0
#connect to minecraft
mc = minecraft.Minecraft.create()

#test MinecraftDrawing

#clear area
mc.setBlocks(-25, 0, -25, 25, 25, 25, block.AIR.id)

#create drawing object
mcDrawing = MinecraftDrawing(mc)

#line
mcDrawing.drawLine(0,0,-10,-10,10,-5,block.STONE.id)

#circle
mcDrawing.drawCircle(-15,15,-15,10,block.WOOD.id)

#sphere
mcDrawing.drawSphere(-15,15,-15,5,block.OBSIDIAN.id)

#face - solid triangle
faceVertices = []
faceVertices.append(minecraft.Vec3(0,0,0))
faceVertices.append(minecraft.Vec3(5,10,0))
faceVertices.append(minecraft.Vec3(10,0,0))
mcDrawing.drawFace(faceVertices, True, block.SNOW_BLOCK.id)

#face - wireframe square - using Points
faceVertices = Points()
faceVertices.add(0,0,5)
faceVertices.add(10,0,5)
Ejemplo n.º 5
0
from mcpi.minecraft import Minecraft
from minecraftstuff import MinecraftDrawing
mc=Minecraft.create()

blocktype=103

x,y,z=mc.player.getPos()

mcd=MinecraftDrawing(mc)
mcd.drawCircle( x+10, y, z, 20,blocktype)
Ejemplo n.º 6
0
from mcpi.minecraft import Minecraft
from time import sleep
from random import randint
from minecraftstuff import MinecraftDrawing  
print("hi ok")
mc = Minecraft.create()
md = MinecraftDrawing(mc) 

x,y,z = mc.player.getTilePos()
sleep(5)
#md.drawHorizontalCircle(x,y,z,10,21)

#md.drawCircle(x,y,z,10,21)

#md.drawHollowSphere(x,y,z,9,20)
md.drawCircle(x+10,y-1,z,10,67)

md.drawCircle(x+10,y-1,z+5,7,23)

md.drawCircle(x+10,y-1,z+10,5,45)

md.drawCircle(x+10,y-1,z+15,3,89)

md.drawCircle(x+10,y-1,z+20,1,37)
Ejemplo n.º 7
0
from mcpi.minecraft import Minecraft
from minecraftstuff import MinecraftDrawing
from mcpi import block
mc = Minecraft.create()
import time

x, y, z = mc.player.getPos()
mcdrawing = MinecraftDrawing(mc)
mcdrawing.drawCircle(x, y + 5, z, 5, block.BEDROCK.id)
Ejemplo n.º 8
0
#connect to minecraft
mc = Minecraft.create()

#test MinecraftDrawing

#clear area
mc.setBlocks(-25, 0, -25, 25, 25, 25, "air")

#create drawing object
mcDrawing = MinecraftDrawing(mc)

#line
mcDrawing.drawLine(0,0,-10,-10,10,-5,"stone")

#circle
mcDrawing.drawCircle(-15,15,-15,10,"WOOD")

#sphere
mcDrawing.drawSphere(-15,15,-15,5,"OBSIDIAN")

#face - solid triangle
faceVertices = []
faceVertices.append(Vec3(0,0,0))
faceVertices.append(Vec3(5,10,0))
faceVertices.append(Vec3(10,0,0))
mcDrawing.drawFace(faceVertices, True, "snow_block")

faceVertices = []
faceVertices.append(Vec3(0,0,5))
faceVertices.append(Vec3(10,0,5))
faceVertices.append(Vec3(10,10,5))
Ejemplo n.º 9
0
from mcpi.minecraft import Minecraft
from minecraftstuff import MinecraftDrawing
logan = Minecraft.create()

pos = logan.player.getPos()
loganDrawing = MinecraftDrawing(logan)
loganDrawing.drawCircle(pos.x, pos.y + 20, pos.z, 9, 11)
Ejemplo n.º 10
0
mc = Minecraft.create()

mcdrawing = MinecraftDrawing(mc)

pos = mc.player.getTilePos()

clockMiddle = pos
clockMiddle.y = clockMiddle.y + 25

CLOCK_RADIUS = 20

HOUR_HAND_LENG = 10
MIN_HAND_LENG = 18
SEC_HAND_LENG = 20

mcdrawing.drawCircle(clockMiddle.x, clockMiddle.y, clockMiddle.z, CLOCK_RADIUS,
                     57)

while True:
    timeNow = datetime.datetime.now()
    #hour
    hours = timeNow.hour

    if hours >= 12:
        hours = timeNow.hour - 12

    minutes = timeNow.minute

    seconds = timeNow.second

    hourHandAngle = (360 / 12) * hours
Ejemplo n.º 11
0
mc = minecraft.Minecraft.create()
# Создаём MinecraftDrawing обЪект для доступа к функциям рисования
mcdrawing = MinecraftDrawing(mc)
# Определяем тякущую позицию игрока
pos = mc.player.getTilePos()
#  Переменные определяющие положение центра окружности
clockMiddle = pos
clockMiddle.y = clockMiddle.y + 25
#  Константы часов
CLOCK_RADIUS = 20
HOUR_HAND_LENGTH = 10
MIN_HAND_LENGTH = 18
SEC_HAND_LENGTH = 20

# Рисуем окружность циферблата часов
mcdrawing.drawCircle(clockMiddle.x, clockMiddle.y, clockMiddle.z, CLOCK_RADIUS,
                     block.DIAMOND_BLOCK.id)

# Запускаем бесконечный цикл
while True:
    # Определяем тякущие время
    timeNow = datetime.datetime.now()
    # часы
    hours = timeNow.hour
    if hours >= 12:
        hours = timeNow.hour - 12
    # минуты
    minutes = timeNow.minute
    # секунды
    seconds = timeNow.second

    # Стрелка часов
Ejemplo n.º 12
0
from mcpi.minecraft import Minecraft
from minecraftstuff import MinecraftDrawing
mc = Minecraft.create()
import time
pos = mc.player.getPos()
x = pos.x
y = pos.y
z = pos.z
front = 3
blockType = 1
radius = 5
hight = 6
mcdrawing = MinecraftDrawing(mc)
mcdrawing.drawCircle(x + front, y + hight, z + front, radius, blockType)
from mcpi.minecraft import Minecraft
from time import sleep
from random import randint
from minecraftstuff import MinecraftDrawing
print("hi ok")
mc = Minecraft.create()
md = MinecraftDrawing(mc)
while True:
    x, y, z = mc.player.getTilePos()
    blocks = mc.events.pollBlockHits()
    for block in blocks:
        bx, by, bz = block.pos
        x, y, z = mc.player.getTilePos()
        sleep(5)
        md.drawHorizontalCircle(x, y, z, 10, 21)
        md.drawCircle(x, y, z, 10, 21)

        md.drawHollowSphere(x, y, z, 9, 20)
Ejemplo n.º 14
0
from mcpi.minecraft import Minecraft
from minecraftstuff import MinecraftDrawing
from mcpi import block
mc=Minecraft.create()
pos=mc.player.getPos()
x=pos.x
y=pos.y
z=pos.z
blockType=block.WATER

mcdrawing=MinecraftDrawing(mc)

mcdrawing.drawCircle(x+6, y+10, z, 3, blockType)