史努比

#include <bits/stdc++.h>
#include "minecraft.h"
#include <Windows.h>
using namespace std;
TxMinecraft mc;
int main() {
    bool con = mc.ConnectMinecraft("zk","4cd7d6e558c943c397a3a5243fa78e19");
    if(!con){
        cout<<"连接失败";
    }
    mc.setPlayerFly("wangyihang");
    string a[47][37],lanse = "251,3",hongse = "251,14",jinse = "251,4",huise = "251,7",chengse = "251,12",luse = "251,13",heise = "251,15";
    int y = 0,z = 0;
    string id,data;
    int _x,_y,_z;
    cout<<"请输入 X Y Z 坐标:";
    cin>>_x>>_y>>_z;
    //0
    for(int i = 11;i<=24;i++){
        a[y][i] = huise;
    }
    y++;//1
    a[y][10] = huise;
    a[y][12] = huise;
    a[y][17] = huise;
    a[y][19] = huise;
    a[y][24] = huise;
    y++;//2
    for(int i = 2;i<=11;i++){
        a[y][i] = huise;
    }
    a[y][17] = huise;
    a[y][23] = huise;
    y++;//3
    a[y][1] = huise;
    a[y][2] = chengse;
    a[y][3] = chengse;
    a[y][4] = jinse;
    a[y][5] = chengse;
    a[y][6] = huise;
    a[y][7] = heise;
    a[y][8] = heise;
    a[y][9] = huise;
    a[y][10] = luse;
    for(int i = 11;i<=22;i++){
        a[y][i] = huise;
    }
    y++;//4
    a[y][0] = huise;
    a[y][1] = luse;
    a[y][2] = chengse;
    a[y][3] = chengse;
    a[y][4] = jinse;
    a[y][5] = jinse;
    a[y][6] = huise;
    a[y][7] = heise;
    a[y][8] = heise;
    a[y][9] = huise;
    a[y][10] = luse;
    a[y][11] = jinse;
    a[y][12] = jinse;
    a[y][13] = jinse;
    a[y][14] = jinse;
    a[y][15] = jinse;
    a[y][16] = chengse;
    a[y][17] = chengse;
    a[y][18] = chengse;
    a[y][19] = luse;
    a[y][20] = luse;
    a[y][21] = jinse;
    for(int i = 22;i<=34;i++){
        a[y][i] = huise;
    }
    y++;//5
    a[y][0] = huise;
    for(int i = 1;i<=6;i++){
        a[y][i] = luse;
    }
    a[y][7] = huise;
    a[y][8] = huise;
    a[y][9] = chengse;
    a[y][10] = chengse;
    a[y][11] = jinse;
    a[y][12] = chengse;
    a[y][13] = chengse;
    a[y][14] = chengse;
    a[y][15] = jinse;
    a[y][16] = chengse;
    a[y][17] = chengse;
    a[y][18] = luse;
    a[y][19] = luse;
    a[y][20] = luse;
    a[y][21] = jinse;
    a[y][22] = jinse;
    a[y][23] = jinse;
    a[y][24] = jinse;
    a[y][25] = chengse;
    a[y][26] = chengse;
    a[y][27] = huise;
    a[y][28] = heise;
    a[y][29] = heise;
    a[y][30] = huise;
    a[y][31] = jinse;
    a[y][32] = jinse;
    a[y][33] = luse;
    a[y][34] = luse;
    a[y][35] = huise;
    y++;//6
    a[y][0] = huise;
    a[y][1] = jinse;
    a[y][2] = jinse;
    a[y][3] = jinse;
    a[y][4] = luse;
    a[y][5] = jinse;
    a[y][6] = jinse;
    a[y][7] = huise;
    a[y][8] = huise;
    a[y][9] = luse;
    a[y][10] = luse;
    a[y][11] = jinse;
    a[y][12] = jinse;
    a[y][13] = luse;
    a[y][14] = chengse;
    a[y][15] = jinse;
    a[y][16] = jinse;
    a[y][17] = jinse;
    a[y][18] = huise;
    a[y][19] = huise;
    a[y][20] = luse;
    a[y][21] = jinse;
    a[y][22] = jinse;
    a[y][23] = jinse;
    a[y][24] = jinse;
    a[y][25] = chengse;
    a[y][26] = chengse;
    a[y][27] = huise;
    a[y][28] = heise;
    a[y][29] = heise;
    a[y][30] = huise;
    a[y][31] = jinse;
    a[y][32] = chengse;
    a[y][33] = chengse;
    a[y][34] = chengse;
    a[y][35] = luse;
    a[y][36] = huise;
    y++;//7
    a[y][0] = huise;
    a[y][1] = chengse;
    a[y][2] = jinse;
    a[y][3] = jinse;
    a[y][4] = chengse;
    a[y][5] = chengse;
    a[y][6] = jinse;
    a[y][7] = huise;
    a[y][8] = huise;
    a[y][9] = luse;
    a[y][10] = chengse;
    a[y][11] = luse;
    a[y][12] = jinse;
    a[y][13] = luse;
    a[y][14] = luse;
    a[y][15] = jinse;
    a[y][16] = huise;
    a[y][17] = huise;
    a[y][20] = huise;
    a[y][21] = huise;
    a[y][22] = jinse;
    a[y][23] = jinse;
    a[y][24] = jinse;
    a[y][25] = luse;
    a[y][26] = jinse;
    a[y][27] = jinse;
    a[y][28] = huise;
    a[y][29] = huise;
    a[y][30] = jinse;
    a[y][31] = jinse;
    a[y][32] = chengse;
    a[y][33] = chengse;
    a[y][34] = chengse;
    a[y][35] = luse;
    a[y][36] = huise;
    y++;//8
    a[y][0] = huise;
    a[y][1] = chengse;
    a[y][2] = jinse;
    a[y][3] = jinse;
    a[y][4] = chengse;
    a[y][5] = chengse;
    a[y][6] = jinse;
    a[y][7] = huise;
    a[y][8] = huise;
    a[y][9] = chengse;
    a[y][10] = chengse;
    a[y][11] = jinse;
    a[y][12] = chengse;
    a[y][13] = chengse;
    a[y][14] = luse;
    a[y][15] = huise;
    a[y][17] = huise;
    a[y][20] = huise;
    a[y][22] = huise;
    a[y][23] = luse;
    a[y][24] = luse;
    a[y][25] = luse;
    a[y][26] = luse;
    a[y][27] = jinse;
    a[y][28] = huise;
    a[y][29] = huise;
    a[y][30] = jinse;
    a[y][31] = jinse;
    a[y][32] = jinse;
    a[y][33] = jinse;
    a[y][34] = jinse;
    a[y][35] = luse;
    a[y][36] = huise;
    y++;//9
    a[y][0] = huise;
    a[y][1] = chengse;
    a[y][2] = chengse;
    a[y][3] = luse;
    a[y][4] = jinse;
    a[y][5] = luse;
    a[y][6] = luse;
    a[y][7] = huise;
    a[y][8] = huise;
    a[y][9] = chengse;
    a[y][10] = jinse;
    a[y][11] = jinse;
    a[y][12] = jinse;
    a[y][13] = chengse;
    a[y][14] = chengse;
    a[y][15] = huise;
    a[y][22] = huise;
    a[y][23] = chengse;
    a[y][24] = jinse;
    a[y][25] = luse;
    a[y][26] = jinse;
    a[y][27] = chengse;
    a[y][28] = huise;
    a[y][29] = huise;
    a[y][30] = jinse;
    a[y][31] = jinse;
    a[y][32] = luse;
    a[y][33] = jinse;
    a[y][34] = jinse;
    a[y][35] = jinse;
    a[y][36] = huise;
    y++;//10
    a[y][0] = huise;
    a[y][1] = luse;
    a[y][2] = luse;
    a[y][3] = chengse;
    a[y][4] = luse;
    a[y][5] = luse;
    a[y][6] = huise;
    a[y][7] = heise;
    a[y][8] = heise;
    a[y][9] = huise;
    a[y][10] = chengse;
    a[y][11] = chengse;
    a[y][12] = luse;
    a[y][13] = chengse;
    a[y][14] = jinse;
    a[y][15] = jinse;
    a[y][16] = huise;
    a[y][21] = huise;
    a[y][22] = chengse;
    a[y][23] = chengse;
    a[y][24] = jinse;
    a[y][25] = jinse;
    a[y][26] = jinse;
    a[y][27] = jinse;
    a[y][28] = huise;
    a[y][29] = huise;
    a[y][30] = luse;
    a[y][31] = luse;
    a[y][32] = luse;
    a[y][33] = jinse;
    a[y][34] = jinse;
    a[y][35] = jinse;
    a[y][36] = huise;
    y++;//11
    a[y][1] = huise;
    a[y][2] = chengse;
    a[y][3] = chengse;
    a[y][4] = jinse;
    a[y][5] = jinse;
    a[y][6] = huise;
    a[y][7] = heise;
    a[y][8] = heise;
    a[y][9] = huise;
    a[y][10] = chengse;
    a[y][11] = chengse;
    a[y][12] = luse;
    a[y][13] = luse;
    a[y][14] = luse;
    a[y][15] = jinse;
    a[y][16] = jinse;
    a[y][17] = huise;
    a[y][20] = huise;
    a[y][21] = chengse;
    a[y][22] = chengse;
    a[y][23] = chengse;
    a[y][24] = chengse;
    a[y][25] = jinse;
    a[y][26] = jinse;
    a[y][27] = jinse;
    a[y][28] = huise;
    a[y][29] = huise;
    a[y][30] = jinse;
    a[y][31] = luse;
    a[y][32] = luse;
    a[y][33] = jinse;
    a[y][34] = luse;
    a[y][35] = jinse;
    a[y][36] = huise;
    y++;//12
    for(int i = 2;i<=18;i++){
        a[y][i] = huise;
    }
    a[y][20] = huise;
    a[y][21] = huise;
    a[y][22] = huise;
    a[y][23] = chengse;
    a[y][24] = chengse;
    a[y][25] = luse;
    a[y][26] = luse;
    a[y][27] = huise;
    a[y][28] = heise;
    a[y][29] = heise;
    a[y][30] = huise;
    a[y][31] = chengse;
    a[y][32] = jinse;
    a[y][33] = chengse;
    a[y][34] = luse;
    a[y][35] = luse;
    a[y][36] = huise;
    y++;//13
    a[y][11] = huise;
    a[y][14] = huise;
    a[y][18] = huise;
    a[y][20] = huise;
    a[y][21] = huise;
    a[y][22] = huise;
    a[y][23] = chengse;
    a[y][24] = chengse;
    a[y][25] = luse;
    a[y][26] = luse;
    a[y][27] = huise;
    a[y][28] = heise;
    a[y][29] = heise;
    a[y][30] = huise;
    a[y][31] = jinse;
    a[y][32] = jinse;
    a[y][33] = jinse;
    a[y][34] = chengse;
    a[y][35] = huise;
    y++;//14
    a[y][12] = huise;
    a[y][13] = huise;
    a[y][14] = huise;
    a[y][18] = huise;
    a[y][20] = huise;
    for(int i = 23;i<=34;i++){
        a[y][i] = huise;
    }
    y++;//15
    a[y][14] = huise;
    a[y][22] = huise;
    a[y][23] = huise;
    y++;//16
    a[y][15] = huise;
    a[y][22] = huise;
    y++;//17
    a[y][16] = huise;
    a[y][21] = huise;
    y++;//18
    for(int i = 17;i<=21;i++){
        a[y][i] = huise;
    }
    y++;//19
    a[y][17] = huise;
    a[y][21] = huise;
    y++;//20
    a[y][17] = huise;
    a[y][21] = huise;
    y++;//21
    a[y][13] = huise;
    a[y][14] = huise;
    a[y][15] = huise;
    a[y][16] = huise;
    a[y][22] = huise;
    a[y][26] = huise;
    a[y][27] = huise;
    a[y][28] = huise;
    a[y][29] = huise;
    y++;//22
    for(int i = 7;i<=12;i++){
        a[y][i] = huise;
    }
    a[y][23] = huise;
    a[y][24] = huise;
    a[y][25] = huise;
    a[y][30] = huise;
    y++;//23
    a[y][5] = huise;
    a[y][6] = huise;
    a[y][24] = huise;
    a[y][27] = huise;
    a[y][28] = huise;
    a[y][29] = huise;
    a[y][31] = huise;
    y++;//24
    a[y][4] = huise;
    for(int i = 26;i<=30;i++){
        a[y][i] = huise;
    }
    a[y][32] = huise;
    y++;//25
    a[y][3] = huise;
    for(int i = 25;i<=30;i++){
        a[y][i] = huise;
    }
    a[y][32] = huise;
    y++;//26
    a[y][3] = huise;
    for(int i = 25;i<=30;i++){
        a[y][i] = huise;
    }
    a[y][32] = huise;
    y++;//27
    a[y][2] = huise;
    a[y][27] = huise;
    a[y][29] = huise;
    a[y][30] = huise;
    a[y][32] = huise;
    y++;//28
    a[y][0] = huise;
    a[y][1] = huise;
    a[y][2] = huise;
    a[y][25] = huise;
    a[y][27] = huise;
    a[y][29] = huise;
    a[y][31] = huise;
    y++;//29
    a[y][0] = huise;
    a[y][1] = huise;
    a[y][2] = huise;
    a[y][25] = huise;
    a[y][26] = huise;
    a[y][28] = huise;
    a[y][31] = huise;
    y++;//30
    a[y][2] = huise;
    a[y][26] = huise;
    a[y][27] = huise;
    a[y][28] = huise;
    a[y][30] = huise;
    y++;//31
    a[y][3] = huise;
    a[y][26] = huise;
    a[y][27] = huise;
    for(int i = 29;i<=35;i++){
        a[y][i] = huise;
    }
    y++;//32
    a[y][3] = huise;
    a[y][13] = huise;
    a[y][28] = huise;
    for(int i = 29;i<=35;i++){
        a[y][i] = hongse;
    }
    a[y][36] = huise;
    y++;//33
    a[y][4] = huise;
    a[y][13] = huise;
    a[y][26] = huise;
    a[y][27] = huise;
    for(int i = 28;i<=35;i++){
        a[y][i] = hongse;
    }
    a[y][36] = huise;
    y++;//34
    a[y][5] = huise;
    a[y][6] = huise;
    a[y][24] = huise;
    a[y][25] = huise;
    for(int i = 26;i<=31;i++){
        a[y][i] = hongse;
    }
    for(int i = 32;i<=35;i++){
        a[y][i] = huise;
    }
    y++;//35
    a[y][7] = huise;
    a[y][8] = huise;
    a[y][9] = huise;
    for(int i = 19;i<=31;i++){
        a[y][i] = huise;
    }
    y++;//36
    a[y][10] = huise;
    a[y][11] = huise;
    a[y][12] = huise;
    for(int i = 15;i<=18;i++){
        a[y][i] = lanse;
    }
    for(int i = 19;i<=27;i++){
        a[y][i] = lanse;
    }
    a[y][24] = "251,0";
    a[y][28] = huise;
    y++;//37
    a[y][13] = huise;
    a[y][14] = huise;
    for(int i = 15;i<=27;i++){
        a[y][i] = lanse;
    }
    a[y][21] = "251,0";
    a[y][24] = "251,0";
    a[y][28] = huise;
    y++;//38
    a[y][12] = huise;
    for(int i = 13;i<=27;i++){
        a[y][i] = lanse;
    }
    a[y][20] = "251,0";
    a[y][22] = "251,0";
    a[y][28] = huise;
    y++;//39
    a[y][12] = huise;
    for(int i = 13;i<=27;i++){
        a[y][i] = lanse;
    }
    a[y][19] = "251,0";
    a[y][23] = "251,0";
    a[y][24] = "251,0";
    a[y][28] = huise;
    y++;//40
    a[y][12] = huise;
    for(int i = 13;i<=24;i++){
        a[y][i] = lanse;
    }
    a[y][18] = "251,0";
    a[y][25] = "251,0";
    a[y][26] = "251,0";
    a[y][27] = huise;
    y++;//41
    a[y][13] = huise;
    for(int i = 14;i<=26;i++){
        a[y][i] = lanse;
    }
    a[y][17] = "251,0";
    a[y][27] = huise;
    y++;//42
    a[y][13] = huise;
    for(int i = 14;i<=25;i++){
        a[y][i] = lanse;
    }
    a[y][16] = "251,0";
    a[y][26] = huise;
    y++;//43
    a[y][14] = huise;
    for(int i = 15;i<=25;i++){
        a[y][i] = lanse;
    }
    a[y][26] = huise;
    y++;//44
    a[y][15] = huise;
    for(int i = 16;i<=24;i++){
        a[y][i] = lanse;
    }
    a[y][25] = huise;
    y++;//45
    for(int i = 16;i<=24;i++){
        a[y][i] = huise;
    }
    for(int i = 0;i<47;i++){
        for(int j = 0;j<37;j++){
            if(a[i][j]==""){
                id = "251";
                data = "0";
            }else{
                id = a[i][j].substr(0,a[i][j].find(","));
                data = a[i][j].substr(a[i][j].find(",")+1);    
            }
            mc.setBlock(_x+j,_y+i,_z+z,stoi(id),stoi(data));
            cout<<i<<" "<<j<<endl;
            Sleep(10);
        }
    }
    return 0;
}

 

posted @ 2023-05-28 08:21  王一行(小号)  阅读(33)  评论(0编辑  收藏  举报