1 #include <iostream> 2 #include "Windows.h" 3 #include "minecraft.h" 4 using namespace std; 5 int x=0,y=0,z=0,id,date; 6 TxMinecraft mc; 7 void d1(int z){ 8 mc.drawLine(x+1,y+1,z,x+7,y+1,z,67,6); 9 mc.drawLine(x+1,y+0,z,x+8,y+0,z,251,15); 10 mc.setBlock(x+3,y+0,z,44,0); 11 mc.setBlock(x+6,y+0,z,44,0); 12 mc.setBlock(x+0,y+0,z,114,4); 13 mc.setBlock(x+9,y+0,z,114,5); 14 // 15 mc.setBlock(x+0,y+1,z,1,0); 16 mc.setBlock(x-1,y+1,z,167,6); 17 mc.setBlock(x+8,y+1,z,67,15); 18 mc.setBlock(x+9,y+1,z,251,15); 19 mc.setBlock(x+10,y+1,z,65,4); 20 // 21 mc.setBlock(x+0,y+2,z,151,0); 22 mc.setBlock(x+1,y+2,z,151,0); 23 mc.setBlock(x+2,y+2,z,167,0); 24 mc.setBlock(x+3,y+2,z,167,0); 25 mc.setBlock(x+9,y+2,z,167,0); 26 mc.setBlock(x+4,y+2,z,67,0); 27 mc.setBlock(x+5,y+2,z,67,2); 28 mc.setBlock(x+6,y+2,z,67,2); 29 mc.setBlock(x+7,y+2,z,44,0); 30 mc.setBlock(x+8,y+2,z,44,0); 31 // 32 mc.drawLine(x+3,y+3,z,x+5,y+3,z,139,1); 33 } 34 void d2(int z){ 35 mc.drawLine(x+0,y+1,z,x+9,y+1,z,101,0); 36 mc.drawLine(x+1,y+0,z,x+2,y+0,z,143,4); 37 mc.drawLine(x+4,y+0,z,x+5,y+0,z,143,4); 38 mc.drawLine(x+7,y+0,z,x+8,y+0,z,143,4); 39 } 40 void d3(int z){ 41 mc.setBlock(x+0,y+0,z,44,8); 42 mc.setBlock(x+9,y+0,z,44,8); 43 mc.setBlock(x+5,y+2,z,44,8); 44 } 45 void d4(int z){ 46 47 } 48 int main(int argc, char** argv) { 49 bool con=mc.ConnectMinecraft("zk.makeblock.net.cn","5e4b836266f24246a55e9fa70d058f7f"); 50 if(!con){ 51 cout<<"sb"; 52 } 53 cout<<"hello!"; 54 mc.setPlayerFly("liujiaxing"); 55 d1(z+1); 56 d2(z+0); 57 d3(z+2); 58 d4(z+3); 59 return 0; 60 }
标签:mc,int,44,坦克车,drawLine,setBlock,67 From: https://www.cnblogs.com/liujiaxing-/p/18047834