from mcpi import minecraft
import time
from lib import Game
from lib import Player
mc = minecraft.Minecraft.create()
a = 0
while True:
    chats = mc.events.pollChatPosts()
    for chat in chats:
        if chat.message == 'game':
            pl = Player.MinePLayer(minecraft_connect=mc, id=chat.entityId)
            x, y, z = pl.getMySight(15)
            Game.arena(mc, x, y, z)
            print(chat)
            a = 1
            break
    if a == 1:
        break

print('aaaaaa')
ids = mc.getPlayerEntityIds()
pls = []
for id in ids:
    pl = Player.MinePLayer(minecraft_connect=mc, id=id)
    pls.append(pl)

while True:
    time.sleep(4)
    for p in pls:
        x, y, z = p.getPos()
        if mc.getBlock(x, y - 1, z) == 57:
from mcpi import minecraft
from lib import Building
from lib import Player
from lib import Goods
from lib import Nature
from mcpi import vec3
import time
import math

mc =minecraft.Minecraft.create()
mc.postToChat("hello ")
mc.postToChat("Neu ban tien len 10 buoc nua, thi mot ngoi nha se xuat hien ")


pl = Player.MinePLayer(mc,"gg")
x_root,y_root,z_root = pl.getPos()
mc =minecraft.Minecraft.create('10.15.0.194')
mc.postToChat("hello")
pl = Player.MinePLayer(mc,"mai")

# pl.setPos(100,200,100)
print(pl.id)
def firecurse ():
    while True: 
        x,y,z = pl.getPos()
        dt =mc.getBlockWithData(x,y-1,z)
        if dt.id == 155:
            Building.fireroad(mc,x-10,y,z-10)
        time.sleep(0.5)
        mc.postToChat("{}".format(dt.id))
        chatEvents = mc.events.pollChatPosts()
Exemple #3
0
from mcpi import minecraft
from lib import Building
from lib import Player
from lib import Goods
from lib import Nature

mc = minecraft.Minecraft.create()
mc.postToChat("hello")
pl = Player.MinePLayer(mc, "gg")
# pl.setPos(100,200,100)
x, y, z = pl.getPos()

Nature.volcano(mc, x, y, z)
bd = Building.Building(mc, x, y, z)
bd.small_house()

Goods.door(mc, x, y, z)