#include <iostream> #include "minecraft.h" using namespace std; TxMinecraft mc; void num1(int x,int y,int z,int id,int data){ mc.setBlock(x,y,z-3,id,data+2); mc.setBlock(x,y,z+3,id,data+3); mc.setBlock(x,y+1,z-2,id,data+6); mc.setBlock(x,y+1,z+2,id,data+7); mc.setBlock(x,y+2,z-2,id,data+2); mc.setBlock(x,y+2,z+2,id,data+3); mc.setBlock(x,y+2,z-1,id,data+3); mc.setBlock(x,y+2,z+1,id,data+2); mc.drawLine(x,y,z-2,x,y,z+2,98,data); mc.drawLine(x,y+1,z-1,x,y+1,z+1,98,data+3); mc.setBlock(x,y,z,98,data+3); mc.drawLine(x,y+3,z-1,x,y+3,z+1,139,0); } void num2(int x,int y,int z,int id,int data){ mc.drawLine(x,y+1,z,x,y+8,z,id,data); mc.drawLine(x+6,y+1,z,x+6,y+12,z,id,data); mc.drawLine(x+14,y+1,z,x+14,y+12,z,id,data); mc.drawLine(x+20,y+1,z,x+20,y+8,z,id,data); mc.drawLine(x,y+9,z,x+5,y+9,z,5,1); mc.drawLine(x+6,y+13,z,x+14,y+13,z,5,1); mc.drawLine(x+15,y+9,z,x+20,y+9,z,5,1); } void num3(int x,int y,int z,int id,int data){ mc.drawLine(x+1,y+8,z,x+5,y+8,z,236,0); mc.fillBlocks(x+7,y+10,z,x+13,y+12,z,236,0); mc.drawLine(x+15,y+8,z,x+19,y+8,z,236,0); mc.drawLine(x+7,y+11,z,x+13,y+11,z,247,0); for(int j = 0;j<=16;j+=16){ for(int i = 0;i<=4;i+=2){ mc.drawLine(x+i+j,y+10,z-2,x+i+j,y+10,z+2,17,9); } } mc.setBlock(x-2,y+10,z,17,5); mc.setBlock(x+22,y+10,z,17,5); mc.fillBlocks(x-1,y+10,z-1,x+5,y+10,z+1,5,5); mc.drawLine(x,y+10,z,x+5,y+10,z,0,0); mc.fillBlocks(x+21,y+10,z-1,x+15,y+10,z+1,5,5); mc.drawLine(x+15,y+10,z,x+20,y+10,z,0,0); mc.drawLine(x+2,y+8,z,x+4,y+8,z,id,data); mc.drawLine(x+16,y+8,z,x+18,y+8,z,id,data); mc.fillBlocks(x+8,y+12,z,x+12,y+10,z,5,5); mc.drawLine(x+9,y+11,z,x+11,y+11,z,id,data); for(int i = 0;i<=8;i+=2){ mc.drawLine(x+6+i,y+14,z-2,x+6+i,y+14,z+2,17,9); } mc.setBlock(x+4,y+14,z,17,5); mc.setBlock(x+16,y+14,z,17,5); mc.fillBlocks(x+5,y+14,z-1,x+15,y+14,z+1,5,5); mc.drawLine(x+6,y+14,z,x+14,y+14,z,0,0); } void num4(int x,int y,int z,int id,int data){ for(int i = 0;i<=14;i+=14){ mc.setBlock(x+3+i,y+7,z,126,8); mc.setBlock(x+1+i,y+7,z,id,data+1); mc.drawLine(x+1+i,y+6,z,x+2+i,y+7,z,id,data+1); mc.setBlock(x+5+i,y+7,z,id,data); mc.drawLine(x+5+i,y+6,z,x+4+i,y+7,z,id,data); } mc.drawLine(x+7,y+9,z,x+13,y+9,z,126,8); mc.drawLine(x+7,y+7,z,x+9,y+9,z,id,data+1); mc.drawLine(x+9,y+8,z,x+11,y+8,z,126,8); mc.drawLine(x+13,y+7,z,x+11,y+9,z,id,data); mc.setBlock(x+7,y+8,z,id,data+1); mc.setBlock(x+13,y+8,z,id,data); mc.setBlock(x+7,y+9,z,id,data); mc.setBlock(x+13,y+9,z,id,data+1); } void num5(int x,int y,int z,int id,int data){ mc.fillBlocks(x-2,y+11,z-2,x+5,y+11,z+2,155,0); mc.setBlock(x+2,y+9,z+1,id,data+7); mc.setBlock(x+4,y+9,z+1,id,data+7); mc.drawLine(x,y+8,z+1,x,y+9,z+1,id,data+7); mc.setBlock(x,y+9,z+2,id,data+3); mc.setBlock(x+2,y+9,z-1,id,data+6); mc.setBlock(x+4,y+9,z-1,id,data+6); mc.drawLine(x,y+8,z-1,x,y+9,z-1,id,data+6); mc.setBlock(x,y+9,z-2,id,data+2); mc.drawLine(x-1,y+8,z,x-1,y+9,z,id,data+4); mc.setBlock(x-2,y+9,z,id,data); for(int i = 0;i<=6;i+=2){ mc.setBlock(x-1+i,y+10,z+2,126,9); mc.setBlock(x-1+i,y+10,z-2,126,9); mc.setBlock(x-1+i,y+10,z+3,44,13); mc.setBlock(x-1+i,y+11,z+3,44,5); mc.setBlock(x-1+i,y+10,z-3,44,13); mc.setBlock(x-1+i,y+11,z-3,44,5); mc.setBlock(x-1+i,y+11,z-2,44,0); mc.setBlock(x-1+i,y+11,z+2,44,0); if(i==6){ continue; } mc.setBlock(x+i,y+12,z-1,44,7); mc.setBlock(x+i,y+12,z+1,44,7); } mc.drawLine(x-2,y+10,z+2,x-2,y+10,z+1,126,9); mc.drawLine(x-2,y+10,z-2,x-2,y+10,z-1,126,9); mc.setBlock(x-3,y+10,z-1,44,13); mc.setBlock(x-3,y+11,z-1,44,5); mc.setBlock(x-3,y+10,z+1,44,13); mc.setBlock(x-3,y+11,z+1,44,5); for(int i = 0;i<=6;i+=2){ mc.setBlock(x-2+i,y+11,z-3,98,3); mc.setBlock(x-2+i,y+11,z+3,98,3); } mc.setBlock(x-3,y+11,z-2,98,3); mc.setBlock(x-3,y+11,z,98,3); mc.setBlock(x-3,y+11,z+2,98,3); mc.setBlock(x-3,y+11,z+3,44,13); mc.setBlock(x-3,y+12,z+3,44,5); mc.setBlock(x-3,y+11,z-3,44,13); mc.setBlock(x-3,y+12,z-3,44,5); mc.setBlock(x-2,y+11,z-1,44,0); mc.setBlock(x-2,y+11,z+1,44,0); mc.setBlock(x-2,y+11,z-2,44,13); mc.setBlock(x-2,y+12,z-2,98,0); mc.setBlock(x-2,y+11,z+2,44,13); mc.setBlock(x-2,y+12,z+2,98,0); mc.setBlock(x-1,y+11,z-1,44,13); mc.setBlock(x-1,y+12,z-1,98,0); mc.setBlock(x-1,y+11,z+1,44,13); mc.setBlock(x-1,y+12,z+1,98,0); mc.drawLine(x,y+12,z,x+5,y+12,z,155,0); mc.setBlock(x-1,y+12,z,98,3); mc.drawLine(x,y+13,z,x+5,y+13,z,98,0); } int main() { bool con = mc.ConnectMinecraft("zk.makeblock.net.cn","4cd7d6e558c943c397a3a5243fa78e19"); if(!con){ cout<<"连接失败"; }else{ cout<<"连接成功"; } mc.setPlayerFly("wangyihang"); int x = 16,y = 66,z = 6125; mc.fillBlocks(x-10,y-20,z-40,x+40,y+40,z+40,0,0); for(int i = 0;i<=20;i++){ if(i==0 || i==6 || i==14 || i==20){ num1(x+i,y,z,109,0); } } num2(x,y,z,251,14); num3(x,y,z,251,11); num4(x,y,z,53,4); num5(x,y,z,134,0); return 0; }
标签:mc,int,drawLine,setBlock,data,id,大门 From: https://www.cnblogs.com/wangyihang-xh/p/17342547.html