#include <iostream> #include "minecraft.h" TxMinecraft mc; using namespace std; void zhuangshi(int x,int y,int z){ mc.drawLine(x+1,y,z,x+2,y,z,143,4); mc.drawLine(x+4,y,z,x+5,y,z,143,4); mc.drawLine(x+7,y,z,x+8,y,z,143,4); mc.drawLine(x,y+1,z,x+9,y+1,z,101,0); } void ludai(int x,int y,int z){ mc.setBlock(x,y,z,114,4); mc.drawLine(x+1,y,z,x+2,y,z,251,15); mc.setBlock(x+3,y,z,44,0); mc.drawLine(x+4,y,z,x+5,y,z,251,15); mc.setBlock(x+6,y,z,44,0); mc.drawLine(x+7,y,z,x+8,y,z,251,15); mc.setBlock(x+9,y,z,114,5); mc.setBlock(x-1,y+1,z,167,6); mc.setBlock(x,y+1,z,1,0); mc.drawLine(x+1,y+1,z,x+7,y+1,z,67,6); mc.setBlock(x+8,y+1,z,67,15); mc.setBlock(x+9,y+1,z,251,15); mc.setBlock(x+10,y+1,z,65,5); mc.drawLine(x,y+2,z,x+1,y+2,z,67,6); mc.drawLine(x+2,y+2,z,x+3,y+2,z,167,0); mc.setBlock(x+4,y+2,z,67,0); mc.drawLine(x+5,y+2,z,x+6,y+2,z,67,2); mc.drawLine(x+7,y+2,z,x+8,y+2,z,44,0); mc.setBlock(x+9,y+2,z,167,0); mc.drawLine(x+3,y+3,z,x+5,y+3,z,139,1); } void lianjie(int x,int y,int z){ mc.setBlock(x,y,z,44,8); mc.setBlock(x+3,y,z,1,0); mc.setBlock(x+6,y,z,1,0); mc.setBlock(x+9,y,z,44,8); mc.drawLine(x-1,y+1,z,x-1,y+2,z,139,1); mc.setBlock(x,y+1,z,1,0); mc.setBlock(x+9,y+1,z,1,0); mc.setBlock(x+10,y+1,z,101,0); mc.drawLine(x+1,y+2,z,x+2,y+2,z,67,2); mc.setBlock(x+3,y+2,z,44,0); mc.setBlock(x+4,y+2,z,1,0); mc.drawLine(x+5,y+2,z,x+6,y+2,z,44,8); mc.setBlock(x+7,y+2,z,67,1); mc.setBlock(x+8,y+2,z,44,0); mc.setBlock(x+9,y+2,z,171,8); mc.drawLine(x+3,y+3,z,x+7,y+3,z,139,1); mc.drawLine(x+4,y+3,z,x+6,y+3,z,1,0); mc.setBlock(x+4,y+4,z,44,0); mc.drawLine(x+5,y+4,z,x+6,y+4,z,171,8); } void paotong(int x,int y,int z){ mc.setBlock(x-1,y,z,44,8); mc.setBlock(x+2,y,z,1,0); mc.setBlock(x+5,y,z,1,0); mc.setBlock(x+8,y,z,44,8); mc.setBlock(x-1,y+1,z,1,0); mc.setBlock(x+8,y+1,z,1,0); mc.setBlock(x+9,y+1,z,101,0); mc.drawLine(x-1,y+2,z,x+7,y+2,z,44,0); mc.setBlock(x+3,y+2,z,1,0); mc.drawLine(x+4,y+2,z,x+5,y+2,z,44,8); mc.setBlock(x+6,y+2,z,1,0); mc.setBlock(x+8,y+2,z,171,8); mc.setBlock(x+14,y+2,z,167,8); mc.setBlock(x+2,y+3,z,139,1); mc.drawLine(x+3,y+3,z,x+5,y+3,z,1,0); mc.setBlock(x+6,y+3,z,139,1); mc.setBlock(x+7,y+3,z,67,1); mc.drawLine(x+8,y+3,z,x+14,y+3,z,44,0); mc.drawLine(x+3,y+4,z,x+4,y+4,z,167,0); mc.setBlock(x+5,y+4,z,171,8); } int main(int argc, char** argv) { bool con=mc.ConnectMinecraft("zk.makeblock.net.cn","868d8493d5f04d0f869ba1e24c863cdd"); if(!con){ cout<<"连接失败"<<endl; return 0; } cout<<"20126 80 19996"<<endl; mc.setPlayerFly("guoliheng"); int x,y,z; //x,y,z=s; // cin>>x>>y>>z; x=20126; y=80; z=19996; // mc.fillBlocks(x-2,y,z-2,x+25,y+30,z+30,0,0); zhuangshi(x,y,z); ludai(x,y,z+1); lianjie(x,y,z+2); paotong(x+1,y,z+3); lianjie(x,y,z+4); ludai(x,y,z+5); zhuangshi(x,y,z+6); return 0; }
标签:mc,drawLine,44,int,setBlock,67,坦克 From: https://www.cnblogs.com/guoliheng/p/18048314