#include <iostream> #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[45][36],hongse = "251,14",jinse = "251,4",huise = "251,7",zongse = "251,12",chengse = "251,1",luse = "251,15"; int y = 0,z = 0; //0 a[y][11] = huise; a[y][12] = huise; a[y][13] = huise; a[y][14] = huise; a[y][15] = huise; a[y][16] = huise; a[y][17] = huise; a[y][18] = huise; a[y][19] = huise; a[y][20] = huise; a[y][21] = huise; a[y][22] = huise; a[y][23] = huise; a[y][24] = huise; string id,data; int _x,_y,_z; cout<<"请输入 X Y Z 坐标:"; cin>>_x>>_y>>_z; for(int i = 0;i<=47;i++){ for(int j = 0;j<=37;j++){ setBlock(_x+j,_y+i,z,251,0); } } for(int i = 0;i<26;i++){ for(int j = 0;j<27;j++){ if(a[i][j]!=""){ 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; }