#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+4,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+16,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); } int main() { bool con = mc.ConnectMinecraft("zk.makeblock.net.cn","4cd7d6e558c943c397a3a5243fa78e19"); if(!con){ cout<<"连接失败"; }else{ cout<<"连接成功"; } mc.setPlayerFly("wangyihang"); int x = -915,y = 93,z = 203; mc.fillBlocks(x,y,z,x+22,y+22,z+22,0,0); num1(x,y,z,24,0); num2(x,y,z,24,0); return 0; }
标签:std,MC,神殿,int,沙漠,include From: https://www.cnblogs.com/wangyihang-xh/p/17299879.html