首页 > 其他分享 >沙漠神殿

沙漠神殿

时间:2023-04-22 10:34:09浏览次数:33  
标签:std TxMinecraft 神殿 int 沙漠 include

#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

相关文章

  • MC 沙漠神殿**还原
    #include<iostream>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;intx=-864,y=150,z=280;intmain(intargc,char**argv){boolcon=mc.ConnectMinecraft("zk.makeblock.net.cn","a9d44e758f6e4cf8b2da2624156f24......
  • MC沙漠神殿
    #include<iostream>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;voidnum1(intx,inty,intz,intid,intdata){for(inti=0;i<=10;i++){mc.fillBlocks(x+i,y+i,z+i,x+20-i,y+i,z+20-i,id,data);}id=0;......
  • 沙漠神殿
    #include<iostream>#include<string>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;intx,y,z,id,data;boolcon=mc.ConnectMinecraft("zk","919b005179e840e1bf78fef437b2f298");voida(){ mc.fillOffsetB......
  • 沙漠神殿(不完整版)
    #include<iostream>#include"minecraft.h"usingnamespacestd;//-85198104TxMinecraftmc;intmain(intargc,char**argv){ boolcon=mc.ConnectMinecraft("zk.makeblock.net.cn","4c4ce4431bdc409388e0a110f5aa9dcc"); if......
  • Linux的shell脚本编写技巧和crontab计划任务的结合(沙漠一样干的干货)
    Shell脚本的重要性我想应该不需要我在重复了,本文的目的是向读者介绍Shell编程的一些固定套路,当然,也可以称之为技巧,而crontab计划任务又和Shell脚本密切相关(一般简单任务当然是写一条命令啦,如果比较复杂的场景还是脚本比较合事宜,并且,脚本更为灵活,拓展性更强啦)。一,脚本的结构就是第一......
  • 千年荒漠变绿洲,看沙漠“卫士”携手昇腾AI植起绿色希望
    摘要:风沙肆虐,沙漠侵蚀神州大地,华东师范大学基于昇腾AI基础软硬件平台研制的种树机器人成为沙漠“卫士”,穿越戈壁,跨越千里,为荒漠治理贡献力量!华师大携手昇腾AI共同植起绿色......
  • valheim英灵神殿Linux使用docker开服
    valheim英灵神殿Linux使用docker开服使用机器:2核4G的Ubuntu,swap设置为8G(满足配置能装docker的Linux就行)在docker官网的镜像站有别人封装好的镜像,我们下载下来启动就可......