//1.初始化参数 #include <iostream> #include <string> #include "minecraft.h" using namespace std; TxMinecraft mc; void wang(int x,int y,int z,int id,int data){ mc.drawLine(x+13,y+15,z,x+2,y+15,z,id,data); mc.drawLine(x+12,y+8,z,x+3,y+8,z,id,data); mc.drawLine(x+14,y,z,x+1,y,z,id,data); mc.drawLine(x+8,y+14,z,x+8,y+1,z,id,data); } void yi(int x,int y,int z,int id,int data){ mc.drawLine(x+13,y+8,z,x+2,y+8,z,id,data); } void hang(int x,int y,int z,int id,int data){ mc.drawLine(x+11,y+14,z,x+14,y+11,z,id,data); mc.drawLine(x+10,y+12,z,x+14,y+8,z,id,data); mc.drawLine(x+11,y+9,z,x+11,y+1,z,id,data); mc.drawLine(x+5,y+14,z,x+2,y+14,z,id,data); mc.drawLine(x+7,y+11,z,x+1,y+11,z,id,data); mc.drawLine(x+4,y+10,z,x+4,y+1,z,id,data); mc.drawLine(x+5,y+2,z,x+6,y+3,z,id,data); } int main(int argc, char** argv) { //2.连接Minecraft bool con = mc.ConnectMinecraft("tk.makeblock.net.cn","4cd7d6e558c943c397a3a5243fa78e19"); if(con){ cout<<"Minecraft连接成功!!!Great!!!"; //3.设置x,y,z,id,data int x = 7774; int y =64; int z = 5533; int id = 251; int data = 0; //4.写第一个字(王) wang(x,y,z,id,data); //5.写第二个字(一) yi(x-20,y,z,id,data); //6.写第三个字(行) hang(x-40,y,z,id,data); }else{ cout<<"Sorry!!!你连不上Minecraft!!!"; } return 0; }
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/288881.html