首页 > 其他分享 >史努比(不完整篇)

史努比(不完整篇)

时间:2023-05-28 10:22:04浏览次数:25  
标签:史努比 mc int 完整篇 include con

#include <iostream>
#include <string>
#include "minecraft.h"
using namespace std;
TxMinecraft mc;
int main(int argc, char** argv)
{
	bool con=mc.ConnectMinecraft("zk.makeblock.net.cn","4c4ce4431bdc409388e0a110f5aa9dcc");
	if(!con){
		return 0;
		cout<<"连接失败";
	}
	bool fly=true;
	mc.setPlayerFly("hanxuyao",fly);
	int x=0,y=0;
	string str[37][47];
	string hui="251,7",red="251,14",blue="251,3",green="251,13",yellow="251,4",zhong="251,12",back="251,15",bai="251,0";
	for(int c=11;c<=24;c++){
		//0
		str[c][y]=hui;
		
	}
	y++;
	//1
	str[10][y]=hui;
	str[12][y]=hui;
	str[19][y]=hui;
	str[24][y]=hui;
	str[11][y]=bai;
	str[18][y]=bai;
	str[13][y]=bai;
	str[14][y]=bai;
	str[15][y]=bai;
	str[16][y]=bai;
	str[20][y]=bai;
	str[21][y]=bai;
	str[22][y]=bai;
	str[23][y]=bai;
	//2
	y++;
	for(int c=2;c<=11;c++){
		str[c][y]=hui;
	}
	str[17][y]=hui;
	str[23][y]=hui;
	str[12][y]=bai;
	str[13][y]=bai;
	str[14][y]=bai;
	str[15][y]=bai;
	str[16][y]=bai;
	str[18][y]=bai;
	str[19][y]=bai;
	str[20][y]=bai;
	str[21][y]=bai;
	str[22][y]=bai;
	//3
	y++;
	for(int c=11;c<=22;c++){
		str[c][y]=hui;
	}
	str[1][y]=hui;
	str[6][y]=hui;
	str[9][y]=hui;
	str[2][y]=zhong;
	str[3][y]=zhong;
	str[5][y]=zhong;
	str[4][y]=yellow;
	str[10][y]=green;
	str[7][y]=back;
	str[8][y]=back;
	//4
	y++;
	str[0][y]=hui;
	str[1][y]=green;
	str[2][y]=zhong;
	str[3][y]=zhong;
	str[4][y]=yellow;
	str[5][y]=yellow;
	str[6][y]=hui;
	str[9][y]=hui;
	str[7][y]=back;
	str[8][y]=back;
	str[10][y]=green;
	for(int c=11;c<=15;c++){
		str[c][y]=yellow;
	}
	str[16][y]=zhong;
	str[17][y]=zhong;
	str[18][y]=zhong;
	str[19][y]=green;
	str[20][y]=green;
	str[21][y]=yellow;
	for(int c=22;c<=34;c++){
		str[c][y]=hui;
	}
	//5
	y++;
	str[0][y]=hui;
	for(int c=1;c<=6;c++){
		str[c][y]=green;
	}
	str[7][y]=hui;
	str[8][y]=hui;
	str[9][y]=zhong;
	str[10][y]=zhong;
	str[11][y]=yellow;
	str[12][y]=zhong;
	str[13][y]=zhong;
	str[14][y]=zhong;
	str[15][y]=yellow;
	str[16][y]=zhong;
	str[17][y]=zhong;
	str[18][y]=green;
	str[19][y]=green;
	str[20][y]=green;
	str[21][y]=yellow;
	str[22][y]=yellow;
	str[23][y]=yellow;
	str[24][y]=yellow;
	str[25][y]=zhong;
	str[26][y]=zhong;
	str[28][y]=back;
	str[29][y]=back;
	str[27][y]=hui;
	str[30][y]=hui;
	str[31][y]=yellow;
	str[32][y]=yellow;
	str[33][y]=green;
	str[34][y]=yellow;
	str[35][y]=hui;
	//6
	y++;
	str[0][y]=hui;
	str[1][y]=yellow;
	str[2][y]=yellow;
	str[3][y]=yellow;
	str[4][y]=green;
	str[5][y]=yellow;
	str[6][y]=yellow;
	str[7][y]=hui;
	str[8][y]=hui;
	str[9][y]=green;
	str[10][y]=green;
	str[11][y]=yellow;
	str[12][y]=yellow;
	str[13][y]=green;
	str[14][y]=zhong;
	str[15][y]=yellow;
	str[16][y]=yellow;
	str[17][y]=yellow;
	str[18][y]=hui;
	str[19][y]=hui;
	str[20][y]=green;
	str[21][y]=yellow;
	str[22][y]=yellow;
	str[23][y]=yellow;
	str[24][y]=yellow;
	str[25][y]=zhong;
	str[26][y]=zhong;
	str[27][y]=hui;
	str[28][y]=back;
	str[29][y]=back;
	str[30][y]=hui;
	str[31][y]=yellow;
	str[32][y]=zhong;
	str[33][y]=zhong;
	str[34][y]=zhong;
	str[35][y]=green;
	str[36][y]=hui;
	//7
	y++;
	str[0][y]=hui;
	str[1][y]=zhong;
	str[2][y]=yellow;
	str[3][y]=yellow;
	str[4][y]=zhong;
	str[5][y]=zhong;
	str[6][y]=yellow;
	str[7][y]=hui;
	str[8][y]=hui;
	str[9][y]=green;
	str[10][y]=zhong;
	str[11][y]=green;
	str[12][y]=yellow;
	str[13][y]=green;
	str[14][y]=green;
	str[15][y]=yellow;
	str[16][y]=hui;
	str[17][y]=hui;
	str[20][y]=hui;
	str[21][y]=hui;
	str[22][y]=yellow;
	str[23][y]=yellow;
	str[24][y]=yellow;
	str[25][y]=green;
	str[26][y]=yellow;
	str[27][y]=yellow;
	str[28][y]=hui;
	str[29][y]=hui;
	str[30][y]=yellow;
	str[31][y]=yellow;
	str[32][y]=zhong;
	str[33][y]=zhong;
	str[34][y]=zhong;
	str[35][y]=green;
	str[36][y]=hui;
	//8
	y++;
	str[0][y]=hui;
	str[1][y]=zhong;
	str[2][y]=yellow;
	str[3][y]=yellow;
	str[4][y]=zhong;
	str[5][y]=zhong;
	str[6][y]=yellow;
	str[7][y]=hui;
	str[8][y]=hui;
	str[9][y]=zhong;
	str[10][y]=zhong;
	str[11][y]=yellow;
	str[12][y]=zhong;
	str[13][y]=zhong;
	str[14][y]=green;
	str[15][y]=hui;
	str[17][y]=hui;
	str[20][y]=hui;
	str[22][y]=hui;
	str[23][y]=green;
	str[24][y]=green;
	str[25][y]=green;
	str[26][y]=green;
	str[27][y]=yellow;
	str[28][y]=hui;
	str[29][y]=hui;
	str[30][y]=yellow;
	str[31][y]=yellow;
	str[32][y]=yellow;
	str[33][y]=yellow;
	str[34][y]=yellow;
	str[35][y]=green;
	str[36][y]=hui;
	//9
	y++;
	str[0][y]=hui;
	str[1][y]=zhong;
	str[2][y]=zhong;
	str[3][y]=green;
	str[4][y]=yellow;
	str[5][y]=green;
	str[6][y]=green;
	str[7][y]=hui;
	str[8][y]=hui;
	str[9][y]=zhong;
	str[10][y]=yellow;
	str[11][y]=yellow;
	str[12][y]=yellow;
	str[13][y]=zhong;
	str[14][y]=zhong;
	str[15][y]=hui;
	str[22][y]=hui;
	str[23][y]=zhong;
	str[24][y]=yellow;
	str[25][y]=green;
	str[26][y]=yellow;
	str[27][y]=zhong;
	str[28][y]=hui;
	str[29][y]=hui;
	str[30][y]=yellow;
	str[31][y]=yellow;
	str[32][y]=green;
	str[33][y]=yellow;
	str[34][y]=yellow;
	str[35][y]=yellow;
	str[36][y]=hui;
	//10
	y++;
	str[0][y]=hui;
	str[1][y]=green;
	str[2][y]=green;
	str[3][y]=zhong;
	str[4][y]=green;
	str[5][y]=green;
	str[6][y]=hui;
	str[7][y]=back;
	str[8][y]=back;
	str[9][y]=hui;
	str[10][y]=zhong;
	str[11][y]=zhong;
	str[12][y]=green;
	str[13][y]=zhong;
	str[14][y]=yellow;
	str[15][y]=yellow;
	str[16][y]=hui;
	str[21][y]=hui;
	str[22][y]=zhong;
	str[23][y]=zhong;
	str[24][y]=yellow;
	str[25][y]=yellow;
	str[26][y]=yellow;
	str[27][y]=yellow;
	str[28][y]=hui;
	str[29][y]=hui;
	str[30][y]=green;
	str[31][y]=green;
	str[32][y]=green;
	str[33][y]=yellow;
	str[34][y]=yellow;
	str[35][y]=yellow;
	str[36][y]=hui;
	//11
	y++;
	str[1][y]=hui;
	str[2][y]=zhong;
	str[3][y]=zhong;
	str[4][y]=yellow;
	str[5][y]=yellow;
	str[6][y]=hui;
	str[7][y]=back;
	str[8][y]=back;
	str[9][y]=hui;
	str[10][y]=zhong;
	str[11][y]=zhong;
	str[12][y]=green;
	str[13][y]=green;
	str[14][y]=green;
	str[15][y]=yellow;
	str[16][y]=yellow;
	str[17][y]=hui;
	str[20][y]=hui;
	str[21][y]=zhong;
	str[22][y]=zhong;
	str[23][y]=zhong;
	str[24][y]=zhong;
	str[25][y]=yellow;
	str[26][y]=yellow;
	str[27][y]=yellow;
	str[28][y]=hui;
	str[29][y]=hui;
	str[30][y]=yellow;
	str[31][y]=green;
	str[32][y]=green;
	str[33][y]=yellow;
	str[34][y]=green;
	str[35][y]=yellow;
	str[36][y]=hui;
	//12
	int x1,y1,z1;
	cin>>x1>>y1>>z1;
	string id,data;
	for(int i=0;i<38;i++){
		for(int j=0;j<48;j++){
			if(str[i][j]==" "){
				str[i][j]=bai;
				continue;
			}else{
				id=str[i][j].substr(0,str[i][j].find(","));
                data=str[i][j].substr(str[i][j].find(",")+1);
                mc.setBlock(x1+i,y1+j,z1,stoi(id),stoi(data));
			}
		}
	}
	return 0;
}

  

标签:史努比,mc,int,完整篇,include,con
From: https://www.cnblogs.com/hanxuyao/p/17437859.html

相关文章

  • 史努比(身体)
    #include<iostream>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;intmain(intargc,char**argv){ boolcon; con=mc.ConnectMinecraft("zk.makeblock.net.cn","03efeed287f44a81950c2a36859d5fb0"); if(con){ cout&......
  • mc 史努比
    #include<iostream>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;intx=0,y=00,z=0;intmain(intargc,char**argv){boolcon=mc.ConnectMinecraft("zk.makeblock.net.cn","a9d44e758f6e4cf8b2da2624156f24d3");if......
  • 爱从26个字母开始 (可爱的史努比)
    A-Accept(接受)世界上没有十全十美的人这句话是千真万确的尤其是两个人一起并不等于两块儿合得来的积木必须互相迁就,记住,你爱他/她就必须接......
  • Redis完整篇
    Redis1.Nosql概述1.1.为什么使用Nosql1、单机Mysql时代90年代,一个网站的访问量一般不会太大,单个数据库完全够用。随着用户增多,网站出现以下问题数据量增加到一定......