1 #include <iostream> 2 #include "minecraft.h" 3 TxMinecraft mc; 4 using namespace std; 5 int main(int argc, char** argv) { 6 bool con= mc.ConnectMinecraft("zk.makeblock.net.cn","3f75c260388d4ed0a24574d340bf4e81"); 7 if(!con){ 8 cout<<"sb远方传来风笛"; 9 } 10 int x,y,z; 11 int id,data; 12 cin>>x>>y>>z; 13 //一个空心小方块 14 mc.fillBlocks(x,y,z,x+5,y,z+5,98,0); 15 mc.fillBlocks(x+1,y,z+1,x+4,y,z+4,0,0); 16 //剩下三个 17 mc.fillBlocks(x+15,y,z,x+20,y,z+5,98,0); 18 mc.fillBlocks(x+16,y,z+1,x+19,y,z+4,0,0); 19 20 mc.fillBlocks(x,y,z+15,x+5,y,z+20,98,0); 21 mc.fillBlocks(x+1,y,z+16,x+4,y,z+19,0,0); 22 23 mc.fillBlocks(x+15,y,z+15,x+20,y,z+20,98,0); 24 mc.fillBlocks(x+16,y,z+16,x+19,y,z+19,0,0); 25 //第一部分链接的东东 26 for(int i=-1;i<2;i++){ 27 mc.drawLine(x+5,y+i,z+1,x+15,y+i,z+1,98,0); 28 mc.drawLine(x+5,y+i,z+19,x+15,y+i,z+19,98,0); 29 mc.drawLine(x+1,y+i,z+5,x+1,y+i,z+15,98,0); 30 mc.drawLine(x+19,y+i,z+5,x+19,y+i,z+15,98,0); 31 } 32 mc.drawLine(x+5,y+2,z+1,x+15,y+2,z+1,109,2);// 33 mc.drawLine(x+5,y+2,z+19,x+15,y+2,z+19,109,3);// 34 mc.drawLine(x+19,y+2,z+5,x+19,y+2,z+15,109,1);// 35 mc.drawLine(x+1,y+2,z+5,x+1,y+2,z+15,109,0);//1 36 37 38 //第二步 39 mc.fillBlocks(x,y,z,x+5,y+2,z,98,0); 40 mc.fillBlocks(x,y+2,z,x+5,y+2,z,109,2); 41 mc.fillBlocks(x+15,y,z,x+20,y+2,z,98,0); 42 mc.fillBlocks(x+15,y+2,z+20,x+20,y+2,z+20,109,3); 43 44 mc.fillBlocks(x,y,z+20,x+5,y+2,z+20,98,0); 45 mc.fillBlocks(x,y+2,z+20,x+5,y+2,z+20,109,3); 46 mc.fillBlocks(x+15,y,z+20,x+20,y+2,z+20,98,0); 47 mc.fillBlocks(x+15,) 48 return 0; 49 }
标签:20,mc,16,19,fillBlocks,15,minecraft From: https://www.cnblogs.com/wangyanbo111/p/17231471.html