#include <iostream> #include <string> #include "minecraft.h" using namespace std; TxMinecraft mc; int main(int argc, char** argv) { bool con=mc.ConnectMinecraft("zk.makeblock.net.cn","4c4ce4431bdc409388e0a110f5aa9dcc"); if(!con){ return 0; cout<<"连接失败"; } string count[29]; //1 count[0]="5,0,0,251,7"; count[1]="9,0,0,251,7"; count[2]="13,0,0,251,7"; count[3]="16,0,0,251,7"; count[4]="19,0,0,251,7"; count[5]="6,0,0,251,10"; count[6]="7,0,0,251,10"; count[7]="8,0,0,251,10"; count[8]="10,0,0,251,10"; count[9]="11,0,0,251,10"; count[10]="12,0,0,251,10"; count[11]="14,0,0,251,10"; count[12]="15,0,0,251,10"; count[13]="17,0,0,251,10"; count[14]="18,0,0,251,10"; //2 count[15]="6,1,0,251,7"; count[16]="10,1,0,251,7"; count[17]="14,1,0,251,7"; count[18]="16,1,0,251,7"; count[19]="19,1,0,251,7"; count[20]="7,1,0,251,10"; count[21]="8,1,0,251,10"; count[22]="9,1,0,251,10"; count[23]="11,1,0,251,10"; count[24]="12,1,0,251,10"; count[25]="13,1,0,251,10"; count[26]="15,1,0,251,10"; count[27]="17,1,0,251,10"; count[28]="18,1,0,251,10"; /*count[0]="6,1,0,251,7"; count[0]="6,2,0,251,7"; count[0]="5,3,0,251,7"; count[0]="4,4,0,251,7"; count[0]="3,5,0,251,7"; count[0]="3,6,0,251,7"; count[0]="2,7,0,251,7"; count[0]="2,8,0,251,7"; count[0]="2,9,0,251,7"; count[0]="1,10,0,251,7"; count[0]="0,11,0,251,7"; count[0]="0,12,0,251,7"; count[0]="0,13,0,251,7"; count[0]="1,14,0,251,7"; count[0]="1,15,0,251,7"; count[0]="0,15,0,251,7"; count[0]="1,15,0,251,7"; count[0]="2,15,0,251,7"; count[0]="3,15,0,251,7"; count[0]="0,15,0,251,7";*/ string x,y,z,id,data; cin>>x>>y>>z; for(int i=0;i<29;i++){ x=count[i].substr(0,count[i].find(",")); count[i]=count[i].substr(count[i].find(",")+1); y=count[i].substr(0,count[i].find(",")); count[i]=count[i].substr(count[i].find(",")+1); z=count[i].substr(0,count[i].find(",")); count[i]=count[i].substr(count[i].find(",")+1); id=count[i].substr(0,count[i].find(",")); count[i]=count[i].substr(count[i].find(",")+1); data=count[i].substr(0,count[i].find(",")); mc.setBlock(stoi(x),stoi(y),stoi(z),stoi(id),stoi(data)); } return 0; }
标签:朱迪,mc,int,include,尼克,con From: https://www.cnblogs.com/hanxuyao/p/17435779.html