#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<<"连接失败"; } bool fly=true; mc.setPlayerFly("hanxuyao",fly); string black="251,15",pink="251,6",pink1="35,6",pink2="35,2",bai="251,0",green="35,5",id,data; int x,y,z; cin>>x>>y>>z; int x1=0,y1=0; string str[34][38]; //1 cout<<"1"<<endl; for(int c=0;c<=33;c++){ str[c][y1]=black; } y1++; //2 str[8][y1]=black; str[10][y1]=black; str[22][y1]=black; str[24][y1]=black; str[9][y1]=pink1; str[23][y1]=pink1; y1++; //3 for(int c=6;c<=14;c++){ str[c][y1]=black; } for(int c=17;c<=26;c++){ str[c][y1]=black; } y1++; //4 str[5][y1]=black; str[6][y1]=pink2; for(int c=7;c<=13;c++){ str[c][y1]=green; } str[14][y1]=black; str[17][y1]=black; str[18][y1]=pink2; for(int c=19;c<=25;c++){ str[c][y1]=green; } str[26][y1]=black; str[27][y1]=black; y1++; //5 str[4][y1]=black; str[5][y1]=pink2; for(int c=6;c<=14;c++){ str[c][y1]=green; } str[15][y1]=black; str[16][y1]=black; str[17][y1]=pink2; for(int c=18;c<=24;c++){ str[c][y1]=green; } str[25][y1]=pink2; str[26][y1]=pink2; str[27][y1]=black; y1++; //6 for(int c=5;c<=24;c++){ str[c][y1]=green; } str[4][y1]=black; str[25][y1]=pink2; str[26][y1]=pink2; str[27][y1]=pink2; str[28][y1]=black; str[29][y1]=black; y1++; //7 str[4][y1]=black; for(int c=5;c<=7;c++){ str[c][y1]=green; } for(int c=8;c<=11;c++){ str[c][y1]=pink2; } for(int c=12;c<=24;c++){ str[c][y1]=green; } for(int c=25;c<=27;c++){ str[c][y1]=pink2; } str[28][y1]=green; str[29][y1]=black; y1++; //8 str[4][y1]=black; str[5][y1]=green; str[6][y1]=green; for(int c=7;c<=11;c++){ str[c][y1]=pink2; } for(int c=12;c<=28;c++){ str[c][y1]=green; } str[29][y1]=black; y1++; //9 str[4][y1]=black; str[5][y1]=green; str[6][y1]=green; str[7][y1]=pink2; str[8][y1]=pink2; for(int c=9;c<=24;c++){ str[c][y1]=black; } for(int c=25;c<=28;c++){ str[c][y1]=green; } str[29][y1]=black; y1++; //10 str[4][y1]=black; str[5][y1]=green; str[6][y1]=green; str[7][y1]=black; str[8][y1]=black; for(int c=9;c<=15;c++){ str[c][y1]=pink1; } str[16][y1]=black; str[17][y1]=pink1; str[18][y1]=black; for(int c=19;c<=24;c++){ str[c][y1]=pink1; } str[25][y1]=black; str[26][y1]=black; str[27][y1]=green; str[28][y1]=green; str[29][y1]=black; y1++; //11 str[4][y1]=black; str[5][y1]=green; for(int c=7;c<=16;c++){ str[c][y1]=pink1; } str[17][y1]=black; for(int c=18;c<=26;c++){ str[c][y1]=pink1; } str[27][y1]=black; str[28][y1]=green; str[29][y1]=black; y1++; //12 for(int c=1;c<=5;c++){ str[c][y1]=black; } for(int c=6;c<=15;c++){ str[c][y1]=pink1; } str[16][y1]=black; str[17][y1]=pink1; str[18][y1]=black; for(int c=27;c<=32;c++){ str[c][y1]=pink1; } y1++; //13 str[0][y1]=black; for(int c=1;c<=32;c++){ str[c][y1]=pink1; } str[33][y1]=black; y1++; //14 str[0][y1]=black; for(int c=1;c<=6;c++){ str[c][y1]=pink1; } str[7][y1]=black; for(int c=8;c<=10;c++){ str[c][y1]=pink1; } str[11][y1]=black; str[12][y1]=black; for(int c=13;c<=21;c++){ str[c][y1]=pink1; } str[22][y1]=black; str[23][y1]=black; for(int c=24;c<=26;c++){ str[c][y1]=pink1; } str[27][y1]=black; for(int c=28;c<=32;c++){ str[c][y1]=pink1; } str[33][y1]=black; y1++; //15 for(int c=1;c<=7;c++){ str[c][y1]=black; } for(int c=8;c<=26;c++){ str[c][y1]=pink1; } for(int c=27;c<=32;c++){ str[c][y1]=black; } y1++; //16 str[5][y1]=black; for(int c=6;c<=28;c++){ str[c][y1]=pink1; } str[29][y1]=black; y1++; //17 str[4][y1]=black; for(int c=5;c<=29;c++){ str[c][y1]=pink1; } str[30][y1]=black; y1++; //18 str[4][y1]=black; for(int c=5;c<=29;c++){ str[c][y1]=pink1; } str[30][y1]=black; y1++; //19 str[4][y1]=black; for(int c=5;c<=29;c++){ str[c][y1]=pink1; } str[30][y1]=black; y1++; //20 str[4][y1]=black; for(int c=5;c<=29;c++){ str[c][y1]=pink1; } str[30][y1]=black; y1++; //21 str[4][y1]=black; for(int c=5;c<=7;c++){ str[c][y1]=pink1; } str[8][y1]=pink; str[9][y1]=pink1; str[10][y1]=pink; for(int c=11;c<=15;c++){ str[c][y1]=pink1; } for(int c=16;c<=18;c++){ str[c][y1]=black; } for(int c=19;c<=23;c++){ str[c][y1]=pink1; } str[24][y1]=pink; str[25][y1]=pink1; str[26][y1]=pink; for(int c=27;c<=29;c++){ str[c][y1]=pink1; } str[30][y1]=black; y1++; //22 str[5][y1]=black; str[6][y1]=pink1; str[7][y1]=pink1; str[8][y1]=pink; str[9][y1]=pink1; str[10][y1]=pink; str[11][y1]=pink1; str[12][y1]=pink1; str[13][y1]=black; str[14][y1]=black; for(int c=15;c<=19;c++){ str[c][y1]=pink1; } str[20][y1]=black; str[21][y1]=black; str[22][y1]=pink1; str[23][y1]=pink1; str[24][y1]=pink; str[25][y1]=pink1; str[26][y1]=pink; str[27][y1]=pink1; str[28][y1]=pink1; str[29][y1]=black; y1++; //23 str[6][y1]=black; for(int c=7;c<=11;c++){ str[c][y1]=pink1; } str[12][y1]=black; str[15][y1]=black; for(int c=16;c<=18;c++){ str[c][y1]=pink1; } str[19][y1]=black; str[22][y1]=black; for(int c=23;c<=27;c++){ str[c][y1]=pink1; } str[28][y1]=black; y1++; //24 for(int c=7;c<=11;c++){ str[c][y1]=black; } str[16][y1]=black; str[18][y1]=black; str[17][y1]=pink1; for(int c=23;c<=27;c++){ str[c][y1]=black; } y1++; //25 str[8][y1]=black; str[17][y1]=black; str[26][y1]=black; y1++; //26 str[8][y1]=black; str[17][y1]=black; str[26][y1]=black; y1++; //27 str[8][y1]=black; str[17][y1]=black; str[26][y1]=black; y1++; //28 str[8][y1]=black; str[9][y1]=black; str[13][y1]=black; str[14][y1]=black; str[17][y1]=black; str[20][y1]=black; str[21][y1]=black; str[25][y1]=black; str[26][y1]=black; y1++; //29 str[9][y1]=black; str[13][y1]=black; str[14][y1]=black; str[17][y1]=black; str[20][y1]=black; str[21][y1]=black; str[25][y1]=black; y1++; //30 str[9][y1]=black; str[10][y1]=black; str[17][y1]=black; str[24][y1]=black; str[25][y1]=black; y1++; //31 str[10][y1]=black; str[16][y1]=black; str[18][y1]=black; str[24][y1]=black; str[17][y1]=pink1; y1++; //32 for(int c=10;c<=15;c++){ str[c][y1]=black; } for(int c=16;c<=18;c++){ str[c][y1]=pink1; } for(int c=19;c<=24;c++){ str[c][y1]=black; } y1++; //33 str[11][y1]=black; str[23][y1]=black; for(int c=12;c<=22;c++){ str[c][y1]=pink1; } y1++; //34 str[11][y1]=black; str[23][y1]=black; str[12][y1]=black; str[22][y1]=black; for(int c=13;c<=21;c++){ str[c][y1]=pink1; } y1++; //35 str[12][y1]=black; str[22][y1]=black; str[13][y1]=black; str[21][y1]=black; for(int c=14;c<=20;c++){ str[c][y1]=pink1; } y1++; //36 str[13][y1]=black; str[21][y1]=black; str[14][y1]=black; str[20][y1]=black; for(int c=15;c<=19;c++){ str[c][y1]=pink1; } y1++; //37 str[14][y1]=black; str[20][y1]=black; str[15][y1]=black; str[19][y1]=black; for(int c=16;c<=18;c++){ str[c][y1]=pink1; } y1++; //38 for(int c=16;c<=18;c++){ str[c][y1]=black; } y1++; for(int i=0;i<34;i++){ for(int j=0;j<38;j++){ if(str[i][j]==""){ str[i][j]=bai; }else{ id=str[i][j].substr(0,str[i][j].find(",")); data=str[i][j].substr(str[i][j].find(",")+1); } mc.setBlock(x+i,y+j,z,stoi(id),stoi(data)); } } return 0; }
标签:cout,mc,int,派大星,include,con From: https://www.cnblogs.com/hanxuyao/p/17488171.html