#include <iostream>
#include <string>
#include <windows.h>
#include "minecraft.h"
using namespace std;
TxMinecraft mc;
int main(int argc, char** argv) {
//连接我的世界
bool con=mc.ConnectMinecraft("tk.makeblock.net.cn","08bd17c1ea594f2684182fd956c2d172");
if(con==false){
cout<<"服务器连接失败";
return 0;
}
mc.setPlayerFly("fushuxuan",true);
int x;
int y;
int z;
cout<<"请输入坐标";
cin>>x>>y>>z;
int id=41;
int data=0;
//腿
mc.drawLine(x+4,y+0,z,x+11,y+0,z,id,data);
mc.drawLine(x+4,y+1,z,x+11,y+1,z,id,data);
data=1;
mc.drawLine(x+4,y+2,z,x+4,y+9,z,id,data);
mc.drawLine(x+5,y+2,z,x+5,y+9,z,id,data);
mc.drawLine(x+6,y+2,z,x+6,y+10,z,id,data);
mc.drawLine(x+7,y+2,z,x+7,y+11,z,id,data);
mc.drawLine(x+8,y+2,z,x+8,y+11,z,id,data);
mc.drawLine(x+9,y+2,z,x+9,y+11,z,id,data);
mc.drawLine(x+10,y+2,z,x+10,y+11,z,id,data);
mc.drawLine(x+11,y+2,z,x+11,y+11,z,id,data);
data=2;
mc.drawLine(x+4,y+10,z,x+4,y+24,z,id,data);
mc.drawLine(x+5,y+10,z,x+5,y+24,z,id,data);
mc.drawLine(x+6,y+11,z,x+6,y+23,z,id,data);
mc.drawLine(x+7,y+12,z,x+7,y+22,z,id,data);
mc.drawLine(x+8,y+12,z,x+8,y+22,z,id,data);
mc.drawLine(x+9,y+12,z,x+9,y+23,z,id,data);
mc.drawLine(x+10,y+12,z,x+10,y+24,z,id,data);
mc.drawLine(x+11,y+12,z,x+11,y+24,z,id,data);
//右胳膊
data=0;
mc.drawLine(x+0,y+12,z,x+0,y+20,z,id,data);
mc.drawLine(x+1,y+12,z,x+1,y+20,z,id,data);
mc.drawLine(x+2,y+12,z,x+2,y+20,z,id,data);
mc.drawLine(x+3,y+12,z,x+3,y+20,z,id,data);
data=1;
mc.drawLine(x+0,y+21,z,x+0,y+24,z,id,data);
mc.drawLine(x+1,y+21,z,x+1,y+24,z,id,data);
mc.drawLine(x+2,y+21,z,x+2,y+24,z,id,data);
mc.drawLine(x+3,y+21,z,x+3,y+24,z,id,data);
//左胳膊
data=0;
mc.drawLine(x+12,y+12,z,x+12,y+20,z,id,data);
mc.drawLine(x+13,y+12,z,x+13,y+20,z,id,data);
mc.drawLine(x+14,y+12,z,x+14,y+20,z,id,data);
mc.drawLine(x+15,y+12,z,x+15,y+20,z,id,data);
data=1;
mc.drawLine(x+12,y+21,z,x+12,y+24,z,id,data);
mc.drawLine(x+13,y+21,z,x+13,y+24,z,id,data);
mc.drawLine(x+14,y+21,z,x+14,y+24,z,id,data);
mc.drawLine(x+15,y+21,z,x+15,y+24,z,id,data);
//身体
data=2;
mc.drawLine(x+4,y+10,z,x+4,y+24,z,id,data);
mc.drawLine(x+5,y+10,z,x+5,y+24,z,id,data);
mc.drawLine(x+6,y+11,z,x+6,y+23,z,id,data);
mc.drawLine(x+7,y+12,z,x+7,y+22,z,id,data);
mc.drawLine(x+8,y+12,z,x+8,y+22,z,id,data);
mc.drawLine(x+9,y+12,z,x+9,y+23,z,id,data);
mc.drawLine(x+10,y+12,z,x+10,y+24,z,id,data);
mc.drawLine(x+11,y+12,z,x+11,y+24,z,id,data);
//头
data=3;
mc.drawLine(x+4,y+32,z,x+11,y+32,z,id,data);
mc.drawLine(x+4,y+31,z,x+11,y+31,z,id,data);
mc.setBlock(x+4,y+30,z,id,data);
mc.setBlock(x+11,y+30,z,id,data);
data=1;
mc.drawLine(x+5,y+30,z,x+10,y+30,z,id,data);
mc.drawLine(x+4,y+29,z,x+11,y+29,z,id,data);
mc.drawLine(x+4,y+25,z,x+4,y+28,z,id,data);
mc.drawLine(x+5,y+25,z,x+5,y+27,z,id,data);
mc.drawLine(x+10,y+25,z,x+10,y+27,z,id,data);
mc.drawLine(x+11,y+25,z,x+11,y+28,z,id,data);
mc.setBlock(x+6,y+27,z,id,data);
mc.setBlock(x+9,y+27,z,id,data);
mc.setBlock(x+7,y+28,z,id,data);
mc.setBlock(x+8,y+28,z,id,data);
data=3;
mc.setBlock(x+7,y+27,z,id,data);
mc.setBlock(x+8,y+27,z,id,data);
mc.setBlock(x+6,y+26,z,id,data);
mc.setBlock(x+9,y+26,z,id,data);
mc.drawLine(x+6,y+25,z,x+9,y+25,z,id,data);
data=1;
mc.drawLine(x+6,y+24,z,x+9,y+24,z,id,data);
mc.setBlock(x+7,y+23,z,id,data);
mc.setBlock(x+8,y+23,z,id,data);
return 0;
}
标签:11,12,mc,drawLine,C++,史蒂夫,data,id From: https://www.cnblogs.com/fushuxuan/p/16748744.html