#include <iostream> #include "minecraft.h" using namespace std; TxMinecraft mc; void num1(int x,int y,int z,int id,int data){ for(int i = 0;i<=10;i++){ mc.fillBlocks(x+i,y+i,z+i,x+20-i,y+i,z+20-i,id,data); } id = 0; for(int i = 1;i<=10;i++){ mc.fillBlocks(x+i+1,y+i,z+i+1,x+19-i,y+i,z+19-i,id,data); } id = 159,data = 1; mc.drawLine(x+7,y,z+10,x+8,y,z+10,id,data); mc.drawLine(x+12,y,z+10,x+13,y,z+10,id,data); mc.drawLine(x+10,y,z+7,x+10,y,z+8,id,data); mc.drawLine(x+10,y,z+12,x+10,y,z+13,id,data); mc.setBlock(x+9,y,z+9,id,data); mc.setBlock(x+9,y,z+11,id,data); mc.setBlock(x+11,y,z+11,id,data); mc.setBlock(x+11,y,z+9,id,data); mc.setBlock(x+10,y,z+10,id,data+10); } void num2(int x,int y,int z,int id,int data){ for(int i = 0;i<=6;i++){ mc.drawLine(x+5+i,y+2,z+1,x+5+i,y+4,z+3,id,data); } mc.fillBlocks(x+5,y+3,z+1,x+11,y+4,z+3,id,data); for(int i = 0;i<=6;i++){ mc.drawLine(x+5+i,y+2,z+19,x+5+i,y+4,z+17,id,data); } mc.fillBlocks(x+5,y+3,z+17,x+11,y+4,z+19,id,data); mc.fillBlocks(x+9,y+5,z+5,x+11,y+7,z+5,id,data+2); mc.fillBlocks(x+9,y+7,z+6,x+11,y+7,z+6,id,data); mc.fillBlocks(x+10,y+5,z+5,x+10,y+6,z+6,0,0); mc.fillBlocks(x+9,y+5,z+15,x+11,y+7,z+15,id,data+2); mc.fillBlocks(x+9,y+7,z+14,x+11,y+7,z+14,id,data); mc.fillBlocks(x+10,y+5,z+15,x+10,y+6,z+14,0,0); id = 24; mc.fillBlocks(x+5,y+4,z+5,x+15,y+4,z+15,id,data); mc.fillBlocks(x+9,y+4,z+9,x+11,y+4,z+11,0,0); mc.drawLine(x+8,y+1,z+8,x+8,y+4,z+8,id,data+2); mc.drawLine(x+8,y+1,z+12,x+8,y+4,z+12,id,data+2); mc.drawLine(x+12,y+1,z+8,x+12,y+4,z+8,id,data+2); mc.drawLine(x+12,y+1,z+12,x+12,y+4,z+12,id,data+2); } void num3(int x,int y,int z,int id,int data){ for(int i = 0;i<=16;i+=16){ id = 24,data = 0; mc.fillBlocks(x,y+1,z+i,x+4,y+9,z+4+i,id,data); mc.fillBlocks(x+1,y+10,z+1+i,x+3,y+10,z+3+i,id,data); mc.fillBlocks(x,y+2,z+1+i,x+3,y+8,z+3+i,id,data+2); mc.fillBlocks(x+1,y+1,z+1+i,x+3,y+8,z+3+i,0,0); id = 159; mc.fillBlocks(x,y+6,z+1+i,x,y+7,z+3+i,id,data+1); mc.drawLine(x,y+2,z+2+i,x,y+5,z+2+i,id,data+1); mc.setBlock(x,y+4,z+1+i,id,data+1); mc.setBlock(x,y+4,z+3+i,id,data+1); mc.setBlock(x,y+4,z+2+i,24,2); mc.setBlock(x,y+6,z+2+i,24,2); id = 128; mc.setBlock(x,y+10,z+2+i,id,data); mc.setBlock(x+2,y+10,z+i,id,data+2); mc.setBlock(x+2,y+10,z+4+i,id,data+3); mc.setBlock(x+4,y+10,z+2+i,id,data+1); mc.fillBlocks(x+4,y+4,z+2+i,x+5,y+6,z+2+i,0,0); mc.drawLine(x+4,y+3,z+2+i,x+5,y+4,z+2+i,id,data); } id = 24; mc.fillBlocks(x+3,y+1,z+1,x+3,y+2,z+2,id,data); mc.fillBlocks(x+3,y+1,z+18,x+3,y+2,z+19,id,data); mc.setBlock(x+2,y+1,z+1,id,data); mc.setBlock(x+2,y+1,z+19,id,data); id = 128; mc.drawLine(x+2,y+2,z+1,x+2,y+1,z+2,id,data+3); mc.drawLine(x+2,y+2,z+19,x+2,y+1,z+18,id,data+2); id = 159; for(int i = 0;i<=20;i+=20){ mc.fillBlocks(x+1,y+6,z+i,x+3,y+7,z+i,id,data+1); mc.drawLine(x+2,y+2,z+i,x+2,y+5,z+i,id,data+1); mc.setBlock(x+1,y+4,z+i,id,data+1); mc.setBlock(x+3,y+4,z+i,id,data+1); mc.setBlock(x+2,y+4,z+i,24,2); mc.setBlock(x+2,y+6,z+i,24,2); } } void num4(int x,int y,int z,int id,int data){ mc.fillBlocks(x+1,y+1,z+5,x+3,y+3,z+15,id,data); mc.fillBlocks(x,y+1,z+8,x,y+3,z+12,id,data); mc.fillBlocks(x,y+4,z+8,x,y+6,z+12,id,data+2); mc.fillBlocks(x,y+1,z+9,x+3,y+3,z+11,0,0); mc.setBlock(x,y+5,z+9,159,1); mc.setBlock(x,y+5,z+11,159,1); mc.setBlock(x,y+6,z+8,0,0); mc.setBlock(x,y+6,z+12,0,0); mc.fillBlocks(x+1,y+4,z+8,x+3,y+4,z+12,id,data); mc.fillBlocks(x+1,y+1,z+9,x+1,y+3,z+11,id,data+2); mc.fillBlocks(x+1,y+1,z+10,x+1,y+2,z+10,0,0); mc.fillBlocks(x+2,y+1,z+4,x+2,y+2,z+16,0,0); mc.drawLine(x+4,y+1,z+8,x+4,y+3,z+8,id,data); mc.drawLine(x+4,y+1,z+12,x+4,y+3,z+12,id,data); for(int j = 0;j<=12;j+=12){ for(int i = 0;i<14;i+=2){ mc.setBlock(x+5+i,y+1,z+4+j,id,data+2); mc.setBlock(x+5+i,y+2,z+4+j,id,data+1); } mc.drawLine(x+5,y+3,z+4+j,x+17,y+3,z+4+j,id,data); } mc.drawLine(x+4,y+1,z+2,x+18,y+1,z+2,id,data); mc.drawLine(x+4,y+1,z+18,x+18,y+1,z+18,id,data); } int main() { bool con = mc.ConnectMinecraft("zk.makeblock.net.cn","4cd7d6e558c943c397a3a5243fa78e19"); if(!con){ cout<<"连接失败"; }else{ cout<<"连接成功"; } mc.setPlayerFly("wangyihang"); int x = 2936,y = 85,z = 1064; mc.fillBlocks(x-10,y-10,z-10,x+30,y+30,z+30,0,0); num1(x,y,z,24,0); num2(x,y,z,24,0); num3(x,y,z,24,0); num4(x,y,z,24,0); return 0; }标签:std,TxMinecraft,神殿,int,沙漠,include From: https://www.cnblogs.com/wangyihang-xh/p/17342551.html