首页 > 编程语言 >c++ 科幻版 沙漠神殿2

c++ 科幻版 沙漠神殿2

时间:2023-07-08 09:14:28浏览次数:32  
标签:24 mc 神殿 int 科幻 50 c++ fillOffsetBlocks void

#include <iostream>
#include "minecraft.h"
#include <string>
using namespace std; 
TxMinecraft mc; 
int x,y,z; 
bool con;
bool lianjie(){
	return con=mc.ConnectMinecraft("mc.makeblock.net.cn","a9d44e758f6e4cf8b2da2624156f24d3");
}
//墙
void qiang();
//上下层
void p1();
//前后面
void p2();
//左右面
void p3();
int main(){ 
	if(!lianjie()){
		cout<<"连接失败";
		return 0; 
	}
	mc.setPlayerFly("wangyueshuo",true);
	cout<<"连接成功";
	cin>>x>>y>>z;
	mc.setVariable(x,y,z);
	//墙面 
	qiang();
	//上下层 		
	p1();
	//前后面 
	p2();
	//左右面
	p3(); 
	return 0;
}
	
//墙	
void qiang(){
	//上
	mc.fillOffsetBlocks(0,50,0,50,50,50,24,0);
	//下
	mc.fillOffsetBlocks(0,0,0,50,0,50,24,0);
	//前 
	mc.fillOffsetBlocks(0,0,0,50,50,0,24,0);
	//后 
	mc.fillOffsetBlocks(0,0,50,50,50,50,24,0);
	//左 
	mc.fillOffsetBlocks(0,0,0,0,50,50,24,0);
	//右 
	mc.fillOffsetBlocks(50,0,0,50,50,50,24,0);
}

//上下层
void p1(){
	for(int i=0;i<2;i++){
	//圆
	mc.offsetDrawCircle(25,50,25,13,251,14,mc.x);
	mc.offsetDrawCircle(25,50,25,7,251,14,mc.x);
	//边
	mc.offsetDrawLine(25,50,10,15,50,0,251,14);
	mc.offsetDrawLine(9,50,0,0,50,9,251,14);
	mc.offsetDrawLine(0,50,15,10,50,25,251,14);
	mc.offsetDrawLine(10,50,25,0,50,35,251,14);
	mc.offsetDrawLine(0,50,41,9,50,50,251,14);
	mc.offsetDrawLine(15,50,50,25,50,40,251,14);
	mc.offsetDrawLine(25,50,40,35,50,50,251,14);
	mc.offsetDrawLine(41,50,50,50,50,41,251,14);
	mc.offsetDrawLine(50,50,35,40,50,25,251,14);
	mc.offsetDrawLine(40,50,25,50,50,15,251,14);
	mc.offsetDrawLine(50,50,9,41,50,0,251,14);
	mc.offsetDrawLine(35,50,0,25,50,10,251,14);
	mc.setVariable(x,y-50,z);
	}
}
//前后面
void p2(){
	mc.setVariable(x,y,z);
	for(int i=0;i<2;i++){
	mc.offsetDrawLine(10,0,0,0,10,0,251,14);
	mc.offsetDrawLine(0,10,0,6,16,0,251,14);
	mc.offsetDrawLine(6,16,0,6,35,0,251,14);
	mc.offsetDrawLine(6,35,0,0,41,0,251,14);
	mc.offsetDrawLine(0,41,0,9,50,0,251,14);
	mc.offsetDrawLine(15,50,0,25,40,0,251,14);
	mc.offsetDrawLine(25,36,0,21,32,0,251,14);
	mc.offsetDrawLine(21,32,0,21,19,0,251,14);
	mc.offsetDrawLine(21,19,0,25,15,0,251,14);
	mc.setOffsetBlock(25,7,0,251,14);
	mc.offsetDrawLine(25,8,0,21,12,0,251,14);
	mc.offsetDrawLine(21,12,0,21,0,0,251,14);
	mc.offsetDrawLine(13,48,0,7,42,0,251,14);
	mc.offsetDrawLine(13,48,0,16,45,0,251,14);
	mc.offsetDrawLine(16,45,0,10,39,0,251,14);
	mc.offsetDrawLine(7,42,0,19,30,0,251,14);
	mc.offsetDrawLine(19,30,0,8,19,0,251,14);
	mc.offsetDrawLine(8,19,0,19,8,0,251,14);
	mc.offsetDrawLine(19,8,0,15,4,0,251,14);
	mc.offsetDrawLine(15,4,0,7,12,0,251,14);
	mc.offsetDrawLine(7,12,0,10,15,0,251,14);
	mc.offsetDrawLine(25,8,0,29,12,0,251,14);
	mc.offsetDrawLine(29,12,0,29,0,0,251,14);
	mc.offsetDrawLine(25,15,0,29,19,0,251,14);
	mc.offsetDrawLine(29,19,0,29,32,0,251,14);
	mc.offsetDrawLine(25,40,0,35,50,0,251,14);
	mc.offsetDrawLine(29,32,0,25,36,0,251,14);
	mc.offsetDrawLine(41,50,0,50,41,0,251,14);
	mc.offsetDrawLine(50,41,0,44,35,0,251,14);
	mc.offsetDrawLine(44,35,0,44,16,0,251,14);
	mc.offsetDrawLine(44,16,0,50,10,0,251,14);
	mc.offsetDrawLine(50,10,0,40,0,0,251,14);
	mc.offsetDrawLine(37,48,0,43,42,0,251,14);
	mc.offsetDrawLine(43,42,0,31,30,0,251,14);
	mc.offsetDrawLine(37,48,0,34,45,0,251,14);
	mc.offsetDrawLine(34,45,0,40,39,0,251,14);
	mc.offsetDrawLine(31,30,0,42,19,0,251,14);
	mc.offsetDrawLine(42,19,0,31,8,0,251,14);
	mc.offsetDrawLine(31,8,0,35,4,0,251,14);
	mc.offsetDrawLine(35,4,0,43,12,0,251,14);
	mc.offsetDrawLine(43,12,0,39,16,0,251,14);
	//挖空
		//四面三角形 
		int t=9;
		for(int j=0;j<10;j++){
			mc.offsetDrawLine(0+t,0+j,0,0,0+j,0,0,0);
			t--;	
		}
		t=0;
		for(int j=0;j<10;j++){
			mc.offsetDrawLine(41+t,0+j,0,50,0+j,0,0,0);
			t++;	
		}
		t=0;
		for(int i=0;i<9;i++){
			mc.offsetDrawLine(0+i,42+t,0,0+i,50,0,0,0);
			t++;
		}
		t=0;
		for(int j=42;j<51;j++){
			mc.offsetDrawLine(50,0+j,0,50-t,0+j,0,0,0);
			t++;	
		}
		//
	for(int i=0;i<6;i++){
		mc.offsetDrawLine(5-i,35+i,0,5-i,(35+i)-(19+i*2),0,0,0);
	}	
	for(int i=0;i<6;i++){
		mc.offsetDrawLine(45+i,35+i,0,45+i,(35+i)-(19+i*2),0,0,0);
	}	
	t=0;	
	for(int i=0;i<4;i++){
		mc.offsetDrawLine(25+i,35-t,0,25+i,16+t,0,95,14);
		mc.offsetDrawLine(25-i,35-t,0,25-i,16+t,0,95,14);
		t++;
	}
		//长方形 
		t=0;
		for(int i=0;i<4;i++){
			mc.offsetDrawLine(8+t,12+t,0,15+t,5+t,0,95,14);
			t++;
		}
		t=0;
		for(int i=0;i<3;i++){
			mc.offsetDrawLine(9+t,12+t,0,15+t,6+t,0,95,14);
			t++;
		}
		
	
	
	
	
	
	
		
	mc.setVariable(x,y,z+50);
	}
}
//左右面
void p3(){
	for(int i=0;i<2;i++){
	mc.offsetDrawLine(0,0,-10,0,10,-0,251,14);
	mc.offsetDrawLine(0,10,-0,0,16,-6,251,14);
	mc.offsetDrawLine(0,16,-6,0,35,-6,251,14);
	mc.offsetDrawLine(0,35,-6,0,41,-0,251,14);
	mc.offsetDrawLine(0,41,-0,0,50,-9,251,14);
	mc.offsetDrawLine(0,50,-15,0,40,-25,251,14);
	mc.offsetDrawLine(0,36,-25,0,32,-21,251,14);
	mc.offsetDrawLine(0,32,-21,0,19,-21,251,14);
	mc.offsetDrawLine(0,19,-21,0,15,-25,251,14);
	mc.setOffsetBlock(0,7,-25,251,14);
	mc.offsetDrawLine(0,8,-25,0,12,-21,251,14);
	mc.offsetDrawLine(0,12,-21,0,0,-21,251,14);
	mc.offsetDrawLine(0,48,-13,0,42,-7,251,14);
	mc.offsetDrawLine(0,48,-13,0,45,-16,251,14);
	mc.offsetDrawLine(0,45,-16,0,39,-10,251,14);
	mc.offsetDrawLine(0,42,-7,0,30,-19,251,14);
	mc.offsetDrawLine(0,30,-19,0,19,-8,251,14);
	mc.offsetDrawLine(0,19,-8,0,8,-19,251,14);
	mc.offsetDrawLine(0,8,-19,0,4,-15,251,14);
	mc.offsetDrawLine(0,4,-15,0,12,-7,251,14);
	mc.offsetDrawLine(0,12,-7,0,15,-10,251,14);
	mc.offsetDrawLine(0,8,-25,0,12,-29,251,14);
	mc.offsetDrawLine(0,12,-29,0,0,-29,251,14);
	mc.offsetDrawLine(0,15,-25,0,19,-29,251,14);
	mc.offsetDrawLine(0,19,-29,0,32,-29,251,14);
	mc.offsetDrawLine(0,40,-25,0,50,-35,251,14);
	mc.offsetDrawLine(0,32,-29,0,36,-25,251,14);
	mc.offsetDrawLine(0,50,-41,0,41,-50,251,14);
	mc.offsetDrawLine(0,41,-50,0,35,-44,251,14);
	mc.offsetDrawLine(0,35,-44,0,16,-44,251,14);
	mc.offsetDrawLine(0,16,-44,0,10,-50,251,14);
	mc.offsetDrawLine(0,10,-50,0,0,-40,251,14);
	mc.offsetDrawLine(0,48,-37,0,42,-43,251,14);
	mc.offsetDrawLine(0,42,-43,0,30,-31,251,14);
	mc.offsetDrawLine(0,48,-37,0,45,-34,251,14);
	mc.offsetDrawLine(0,45,-34,0,39,-40,251,14);
	mc.offsetDrawLine(0,30,-31,0,19,-42,251,14);
	mc.offsetDrawLine(0,19,-42,0,8,-31,251,14);
	mc.offsetDrawLine(0,8,-31,0,4,-35,251,14);
	mc.offsetDrawLine(0,4,-35,0,12,-43,251,14);
	mc.offsetDrawLine(0,12,-43,0,16,-39,251,14);
	mc.setVariable(x+50,y,z+50);
	}
} 

  

标签:24,mc,神殿,int,科幻,50,c++,fillOffsetBlocks,void
From: https://www.cnblogs.com/wangyueshuo/p/17536605.html

相关文章

  • 请使用C++计算出2^2023与3^2023的和
    易知,这个和的数字是非常大的,大到longlong都装不下,这个时候如果使用longlong是无法进行运算的。欸!这会高精度算法(即大数运算)就开始发光发热了。以下是我看资料总结的一些歪瓜裂枣。对于一位高精度数字,用整数数组存储,数组每一个元素对应一位十进制数,由其下标顺序指明位序号......
  • 沙漠神殿(科幻版)
    #include<iostream>#include"minecraft.h"#include"Windows.h"#include<string>usingnamespacestd;TxMinecraftmc;intx,y,z,id,data;voida(){//左 mc.offsetDrawLine(40,0,0,50,10,0,251,14); mc.offsetDrawLine(50,10,0,......
  • 沙漠神殿
    #include<iostream>#include<string>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;voidone(intx,inty,intz){ intid,data; id=179;data=1; mc.drawLine(x+10,y,z,x,y+10,z,id,data); mc.drawLine(x,y+10,z,x+5,y+15,z,id......
  • 沙漠神殿
    #include<bits/stdc++.h>#include"minecraft.h"#include<Windows.h>usingnamespacestd;TxMinecraftmc;intid=159,data=14;/*structBlock{intx,y,z,id,data,_x,_y,_z;voidb(TxMinecraftmc){mc.setBlock(_x+x,_y......
  • 沙漠神殿(科幻版)
    #include<iostream>#include<string>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;intmain(intargc,char**argv){boolcon=mc.ConnectMinecraft("zk.makeblock.net.cn","4c4ce4431bdc409388e0a110f5aa9d......
  • 沙漠神殿
    #include<iostream>#include"Windows.h"#include"minecraft.h"TxMinecraftmc;usingnamespacestd;intid=179,data=1;voidxian(intx,inty,intz){mc.drawLine(x+10,y,z,x,y+10,z,id,data);mc.drawLine(x,y+10,z,x+6,y+16,z......
  • c++沙漠神殿
    #include<iostream>#include"minecraft.h"#include<string>usingnamespacestd;TxMinecraftmc;intx=0,y=0,z=0;intmain(intargc,char**argv){boolcon=mc.ConnectMinecraft("zk.makeblock.net.cn","a9d44e758f6e4cf8b......
  • 沙漠神殿 (x)
    #include<iostream>#include<string>#include"Windows.h"#include"minecraft.h"TxMinecraftmc;usingnamespacestd;intmain(intargc,char**argv){boolcon=mc.ConnectMinecraft("zk","2839fa7a......
  • C++黑马程序员——P193-196. string容器 字符串比较,字符存取,字符串插入和删除,子串
    P193.string容器——字符串比较P194....——字符存取P195....——字符串插入和删除P196....——子串获取P193.字符串比较 ——————————————————————————————————————————————————————————1//字符......
  • C++黑马程序员——P189-192. string容器 构造函数,赋值,拼接,查找和替换
    P189.string容器——构造函数P190....——赋值操作P191....——字符串拼接P192....——字符串查找和替换P189.构造函数———————————————————————————————————————————————————————————————......