首页 > 其他分享 >西瓜(错误版)

西瓜(错误版)

时间:2023-06-17 18:33:32浏览次数:27  
标签:西瓜 错误 yellow green 35 y1 black red

#include <iostream>
#include <string>
#include "minecraft.h"
using namespace std;
TxMinecraft mc;
/*绿色:35/13
黄绿色:35/5
红色:35/14
黑色:35/15*/
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);
    string s[15][8][15];
    int x,y,z;
    cin>>x>>y>>z;
    string id,data;
    string green="35,13",yellow="35,3",red="35,14",black="35,15";
    //1
    int y1=0;
    s[-1][y1][-2]=yellow;
    s[0][y1][-2]=yellow;
    s[1][y1][-2]=yellow;
    s[-2][y1][-1]=yellow;
    s[-1][y1][-1]=yellow;
    s[0][y1][-1]=yellow;
    s[1][y1][-1]=yellow;
    s[2][y1][-1]=yellow;
    s[-2][y1][0]=yellow;
    s[-1][y1][0]=yellow;
    s[0][y1][0]=yellow;
    s[1][y1][0]=yellow;
    s[2][y1][0]=yellow;
    s[-2][y1][1]=yellow;
    s[-1][y1][1]=yellow;
    s[0][y1][1]=yellow;
    s[1][y1][1]=yellow;
    s[2][y1][1]=yellow;
    s[-1][y1][2]=yellow;
    s[0][y1][2]=yellow;
    s[1][y1][2]=yellow;
    y1++;
    //2
    s[-2][y1][-4]=yellow;
    s[-1][y1][-4]=yellow;
    s[1][y1][-4]=yellow;
    s[2][y1][-4]=yellow;
    s[-3][y1][-3]=yellow;
    s[3][y1][-3]=yellow;
    s[-2][y1][-3]=yellow;
    s[-1][y1][-3]=yellow;
    s[1][y1][-3]=yellow;
    s[2][y1][-3]=yellow;
    s[-3][y1][-2]=yellow;
    s[-2][y1][-2]=yellow;
    s[2][y1][-2]=yellow;
    s[3][y1][-2]=yellow;
    s[-4][y1][-1]=yellow;
    s[4][y1][-1]=yellow;
    s[-4][y1][0]=yellow;
    s[4][y1][0]=yellow;
    s[-3][y1][0]=yellow;
    s[3][y1][0]=yellow;
    s[-4][y1][1]=yellow;
    s[4][y1][1]=yellow;
    s[-3][y1][2]=yellow;
    s[-2][y1][2]=yellow;
    s[2][y1][2]=yellow;
    s[3][y1][2]=yellow;
    s[-3][y1][3]=yellow;
    s[3][y1][3]=yellow;
    s[-2][y1][3]=yellow;
    s[-1][y1][3]=yellow;
    s[1][y1][3]=yellow;
    s[2][y1][3]=yellow;
    s[-2][y1][4]=yellow;
    s[-1][y1][4]=yellow;
    s[1][y1][4]=yellow;
    s[2][y1][4]=yellow;
    s[0][y1][-4]=green;
    s[0][y1][-3]=green;
    s[-4][y1][-2]=green;
    s[4][y1][-2]=green;
    s[-3][y1][-1]=green;
    s[3][y1][-1]=green;
    s[-3][y1][1]=green;
    s[3][y1][1]=green;
    s[-4][y1][2]=green;
    s[4][y1][2]=green;
    s[0][y1][4]=green;
    s[0][y1][3]=green;
    y1++;
    //3
    s[-2][y1][-5]=yellow;
    s[1][y1][-5]=yellow;
    s[2][y1][-5]=yellow;
    s[3][y1][-4]=yellow;
    s[-3][y1][-4]=yellow;
    s[4][y1][-3]=yellow;
    s[-4][y1][-3]=yellow;
    s[5][y1][-1]=yellow;
    s[-5][y1][-1]=yellow;
    s[5][y1][0]=yellow;
    s[-5][y1][0]=yellow;
    s[5][y1][1]=yellow;
    s[-5][y1][1]=yellow;
    s[-2][y1][5]=yellow;
    s[1][y1][5]=yellow;
    s[2][y1][5]=yellow;
    s[3][y1][4]=yellow;
    s[-3][y1][4]=yellow;
    s[4][y1][3]=yellow;
    s[-4][y1][3]=yellow;
    s[-1][y1][-5]=green;
    s[0][y1][-5]=green;    
    s[-5][y1][-2]=green;
    s[5][y1][-2]=green;
    s[-5][y1][2]=green;
    s[5][y1][2]=green;
    s[1][y1][5]=green;
    s[0][y1][5]=green;
    y1++;
    //4    
    s[1][y1][-6]=green;
    s[0][y1][-6]=green;
    s[-5][y1][-3]=green;
    s[5][y1][-3]=green;
    s[-6][y1][-2]=green;
    s[6][y1][-2]=green;
    s[-1][y1][6]=green;
    s[0][y1][6]=green;
    s[-5][y1][3]=green;
    s[5][y1][3]=green;
    s[-6][y1][2]=green;
    s[6][y1][2]=green;
    s[-2][y1][-6]=yellow;
    s[-1][y1][-6]=yellow;
    s[2][y1][-6]=yellow;
    s[-3][y1][-5]=yellow;
    s[3][y1][-5]=yellow;
    s[-4][y1][-4]=yellow;
    s[4][y1][-4]=yellow;
    s[-6][y1][-1]=yellow;
    s[6][y1][-1]=yellow;
    s[-6][y1][0]=yellow;
    s[6][y1][0]=yellow;
    s[-6][y1][1]=yellow;
    s[6][y1][1]=yellow;
    s[-3][y1][5]=yellow;
    s[3][y1][5]=yellow;
    s[-4][y1][4]=yellow;
    s[4][y1][4]=yellow;
    s[-2][y1][6]=yellow;
    s[1][y1][6]=yellow;
    s[2][y1][6]=yellow;
    y1++;
    //5
    s[-3][y1][-6]=yellow;
    s[-2][y1][-6]=yellow;
    s[3][y1][-6]=yellow;
    s[2][y1][-6]=yellow;
    s[1][y1][-6]=yellow;
    s[-4][y1][-5]=yellow;
    s[4][y1][-5]=yellow;
    s[-5][y1][-4]=yellow;
    s[5][y1][-4]=yellow;
    s[-6][y1][-2]=yellow;
    s[6][y1][-2]=yellow;
    s[-6][y1][-1]=yellow;
    s[6][y1][-1]=yellow;
    s[-6][y1][0]=yellow;
    s[6][y1][0]=yellow;
    s[-6][y1][2]=yellow;
    s[6][y1][2]=yellow;
    s[-6][y1][1]=yellow;
    s[6][y1][1]=yellow;
    s[-3][y1][6]=yellow;
    s[-2][y1][6]=yellow;
    s[3][y1][6]=yellow;
    s[2][y1][6]=yellow;
    s[1][y1][6]=yellow;
    s[-4][y1][5]=yellow;
    s[4][y1][5]=yellow;
    s[-5][y1][4]=yellow;
    s[5][y1][4]=yellow;
    s[-1][y1][-6]=green;
    s[0][y1][-6]=green;
    s[-6][y1][-3]=green;
    s[6][y1][-3]=green;
    s[-6][y1][3]=green;
    s[6][y1][3]=green;
    s[1][y1][6]=green;
    s[0][y1][6]=green;
    y1++;
    //6
    s[0][y1][-7]=green;
    s[-1][y1][-7]=green;
    s[6][y1][-3]=green;
    s[-6][y1][-3]=green;
    s[0][y1][-7]=green;
    s[1][y1][-7]=green;
    s[6][y1][3]=green;
    s[-6][y1][3]=green;
    s[-1][y1][-7]=yellow;
    s[-4][y1][-6]=yellow;
    s[-3][y1][-6]=yellow;
    s[-2][y1][-6]=yellow;
    s[4][y1][-6]=yellow;
    s[3][y1][-6]=yellow;
    s[2][y1][-6]=yellow;
    s[-5][y1][-5]=yellow;
    s[5][y1][-5]=yellow;
    s[-6][y1][-4]=yellow;
    s[6][y1][-4]=yellow;
    s[-6][y1][-2]=yellow;
    s[6][y1][-2]=yellow;
    s[-7][y1][-1]=yellow;
    s[7][y1][-1]=yellow;
    s[-7][y1][0]=yellow;
    s[7][y1][0]=yellow;
    s[-7][y1][1]=yellow;
    s[7][y1][1]=yellow;
    s[-6][y1][2]=yellow;
    s[6][y1][2]=yellow;
    s[-6][y1][4]=yellow;
    s[6][y1][4]=yellow;
    s[-5][y1][5]=yellow;
    s[5][y1][5]=yellow;
    s[-1][y1][7]=yellow;
    s[-4][y1][6]=yellow;
    s[-3][y1][6]=yellow;
    s[-2][y1][6]=yellow;
    s[4][y1][6]=yellow;
    s[3][y1][6]=yellow;
    s[2][y1][6]=yellow;
    y1++;
    //7
    s[1][y1][-7]=yellow;
    s[2][y1][-7]=yellow;
    s[-2][y1][-7]=yellow;
    s[-3][y1][-6]=yellow;
    s[-4][y1][-6]=yellow;
    s[3][y1][-6]=yellow;
    s[4][y1][-6]=yellow;
    s[-5][y1][-5]=yellow;
    s[5][y1][-5]=yellow;
    s[-6][y1][-4]=yellow;
    s[7][y1][-2]=yellow;
    s[7][y1][-1]=yellow;
    s[-7][y1][-1]=yellow;
    s[7][y1][0]=yellow;
    s[-7][y1][0]=yellow;
    s[7][y1][1]=yellow;
    s[-7][y1][1]=yellow;
    s[6][y1][4]=yellow;
    s[-1][y1][7]=yellow;
    s[-2][y1][7]=yellow;
    s[2][y1][7]=yellow;
    s[-3][y1][6]=yellow;
    s[-4][y1][6]=yellow;
    s[3][y1][6]=yellow;
    s[4][y1][6]=yellow;
    s[-5][y1][5]=yellow;
    s[5][y1][5]=yellow;
    s[-1][y1][-7]=green;
    s[0][y1][-7]=green;
    s[6][y1][-4]=green;
    s[6][y1][-3]=green;
    s[-6][y1][-3]=green;
    s[-2][y1][-7]=green;
    s[2][y1][7]=green;
    s[1][y1][7]=green;
    s[0][y1][7]=green;
    s[-6][y1][4]=green;
    s[6][y1][3]=green;
    s[-6][y1][3]=green;
    s[-2][y1][-6]=red;
    s[-1][y1][-6]=red;
    s[0][y1][-6]=red;
    s[2][y1][-6]=red;
    s[1][y1][-6]=red;
    s[-2][y1][-5]=red;
    s[-1][y1][-5]=red;
    s[0][y1][-5]=red;
    s[2][y1][-5]=red;
    s[1][y1][-5]=red;
    s[-4][y1][-5]=red;
    s[-3][y1][-5]=red;
    s[3][y1][-5]=red;
    s[4][y1][-5]=red;
    s[-2][y1][-4]=red;
    s[-1][y1][-4]=red;
    s[0][y1][-4]=red;
    s[2][y1][-4]=red;
    s[1][y1][-4]=red;
    s[-4][y1][-4]=red;
    s[-3][y1][-4]=black;
    s[3][y1][-4]=red;
    s[4][y1][-4]=red;
    s[5][y1][-4]=red;
    s[-5][y1][-4]=red;
    s[-2][y1][-3]=red;
    s[-1][y1][-3]=red;
    s[0][y1][-3]=red;
    s[2][y1][-3]=red;
    s[1][y1][-3]=black;
    s[-4][y1][-3]=red;
    s[-3][y1][-3]=red;
    s[3][y1][-3]=red;
    s[5][y1][-3]=red;
    s[-5][y1][-3]=red;
    s[-2][y1][-2]=red;
    s[-1][y1][-2]=red;
    s[0][y1][-2]=red;
    s[2][y1][-2]=red;
    s[1][y1][-2]=red;
    s[-4][y1][-2]=red;
    s[-3][y1][-2]=red;
    s[3][y1][-2]=red;
    s[5][y1][-2]=red;
    s[-5][y1][-2]=black;
    s[6][y1][-2]=red;
    s[-6][y1][-2]=red;
    s[-2][y1][-1]=red;
    s[-1][y1][-1]=red;
    s[0][y1][-1]=red;
    s[2][y1][-1]=red;
    s[1][y1][-1]=red;
    s[-4][y1][-1]=red;
    s[-3][y1][-1]=red;
    s[3][y1][-1]=red;
    s[5][y1][-1]=red;
    s[-5][y1][-1]=red;
    s[6][y1][-1]=red;
    s[-6][y1][-1]=red;
    s[-2][y1][0]=black;
    s[-1][y1][0]=red;
    s[0][y1][0]=red;
    s[2][y1][0]=red;
    s[1][y1][0]=red;
    s[-4][y1][0]=red;
    s[-3][y1][0]=red;
    s[3][y1][0]=red;
    s[4][y1][0]=red;
    s[5][y1][0]=red;
    s[-5][y1][0]=red;
    s[6][y1][0]=red;
    s[-6][y1][0]=red;
    s[-2][y1][1]=red;
    s[-1][y1][1]=red;
    s[0][y1][1]=red;
    s[2][y1][1]=red;
    s[1][y1][1]=red;
    s[-4][y1][1]=red;
    s[-3][y1][1]=red;
    s[3][y1][1]=red;
    s[4][y1][1]=red;
    s[5][y1][1]=red;
    s[-5][y1][1]=red;
    s[6][y1][1]=red;
    s[-6][y1][1]=red;
    s[-2][y1][2]=red;
    s[-1][y1][2]=red;
    s[0][y1][2]=red;
    s[2][y1][2]=red;
    s[1][y1][2]=red;
    s[-4][y1][2]=black;
    s[-3][y1][2]=red;
    s[3][y1][2]=red;
    s[4][y1][2]=black;
    s[5][y1][2]=red;
    s[-5][y1][2]=red;
    s[6][y1][2]=red;
    s[-6][y1][2]=red;
    s[-2][y1][3]=red;
    s[-1][y1][3]=red;
    s[0][y1][3]=red;
    s[2][y1][3]=red;
    s[1][y1][3]=red;
    s[-4][y1][3]=red;
    s[-3][y1][3]=red;
    s[3][y1][3]=red;
    s[4][y1][3]=red;
    s[5][y1][3]=red;
    s[-5][y1][3]=red;
    s[-2][y1][4]=red;
    s[-1][y1][4]=red;
    s[0][y1][4]=red;
    s[2][y1][4]=black;
    s[1][y1][4]=red;
    s[-4][y1][4]=red;
    s[-3][y1][4]=red;
    s[3][y1][4]=red;
    s[4][y1][4]=red;
    s[5][y1][4]=red;
    s[-5][y1][4]=red;
    s[-2][y1][5]=red;
    s[-1][y1][5]=black;
    s[0][y1][5]=red;
    s[2][y1][5]=red;
    s[1][y1][5]=red;
    s[-4][y1][5]=red;
    s[-3][y1][5]=red;
    s[3][y1][5]=red;
    s[4][y1][5]=red;
    s[-2][y1][6]=red;
    s[-1][y1][6]=red;
    s[0][y1][6]=red;
    s[2][y1][6]=red;
    s[1][y1][6]=red;
    y1++;
    //8
    s[-2][y1][-7]=yellow;
    s[2][y1][-7]=yellow;
    s[-3][y1][-6]=yellow;
    s[4][y1][-6]=yellow;
    s[-4][y1][-6]=yellow;
    s[3][y1][-6]=yellow;
    s[-5][y1][-5]=yellow;
    s[5][y1][5]=yellow;
    s[-7][y1][-1]=yellow;
    s[7][y1][-1]=yellow;
    s[-7][y1][0]=yellow;
    s[7][y1][0]=yellow;
    s[-7][y1][1]=yellow;
    s[7][y1][1]=yellow;
    s[-2][y1][7]=yellow;
    s[2][y1][7]=yellow;
    s[-3][y1][6]=yellow;
    s[4][y1][6]=yellow;
    s[-4][y1][6]=yellow;
    s[3][y1][6]=yellow;
    s[-5][y1][5]=yellow;
    s[5][y1][5]=yellow;
    s[0][y1][-7]=yellow;
    s[1][y1][-7]=yellow;
    s[-1][y1][-7]=yellow;
    s[-6][y1][-3]=yellow;
    s[6][y1][-3]=yellow;
    s[-6][y1][-4]=yellow;
    s[6][y1][-4]=yellow;
    s[-7][y1][-2]=yellow;
    s[7][y1][-2]=yellow;
    s[-7][y1][2]=yellow;
    s[7][y1][2]=yellow;
    s[0][y1][7]=yellow;
    s[1][y1][7]=yellow;
    s[-1][y1][7]=yellow;
    s[-6][y1][3]=yellow;
    s[6][y1][3]=yellow;
    s[-6][y1][4]=yellow;
    s[6][y1][4]=yellow;
     for(int i=-7;i<8;i++){
        for(int j=0;j<9;j++){
            for(int c=-7;c<8;c++){
                if(s[i][j][c]==" "){
                s[i][j][c]="0,0";
                continue;
            }else{
                id=s[i][j][c].substr(0,s[i][j][c].find(","));
                data=s[i][j][c].substr(s[i][j][c].find(",")+1);
                mc.setBlock(x+i,y+j,z,stoi(id),stoi(data));
                }
            
            }
        }
    }
    return 0;
}

 

标签:西瓜,错误,yellow,green,35,y1,black,red
From: https://www.cnblogs.com/hanxuyao/p/17488047.html

相关文章

  • MySQL错误类型1030
     该错误类型一般为磁盘内存空间不足。常规情况下清除备份文件即可。引用:mysql出现1030Goterror28fromstorageengine解决方法_风火程序员的博客-CSDN博客......
  • 【Azure 环境】使用az login登录遇见OSError: [WinError -2146893813] : '' 错误
    azlogin|Decryptionfailed:[WinError-2146893813]Keynotvaidforuseinspecifiedstate|msal_extensions.persistence:DPAPIerrorlikelycausedbyfilecontentnotpreviouslyencrypted.Appdevelopershouldmigratebycallingsave(......
  • 【Java技术专题】「Guava开发指南」手把手教你如何进行使用Guava工具箱进行开发系统实
    异常传播有时候,您可能需要重新抛出捕获到的异常。这种情况通常发生在捕获到Error或RuntimeException时,因为您可能没有预料到这些异常,但在声明捕获Throwable和Exception时,它们也被包含在内了。为了解决这个问题,Guava提供了多种方法来判断异常类型并重新抛出异常。例如:try{......
  • JackSon版本导致错误
    使用Jackson时需要在Maven导入三个包jackson-databindjackson-corejackson-annotations我在使用时出现了如下的报错Causedby:org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[org.springframework.web.servlet.mvc.method.annotation.Reques......
  • 基于MySQL 8.0从库磁盘满报13121错误的处理
    背景:基于GTID的从库服务器磁盘使用率100%,扩容磁盘后报错,开启复制,过一会就报错13121错误一.报错现象: Last_SQL_Errno:13121Last_SQL_Error:Relaylogreadfailure:Couldnotparserelaylogevententry.Thepossiblereasonsare:themaster'sbinarylogiscorrupted......
  • MySQL报错1406_MySQL #1406 Data too long错误
    造成这个错误有两种可能1)仔细检查sql语句是不是插入值颠倒了位置2)java端与mysql表编码不一致:1.修改Server端编码。修改character_set_xxx2.在JDBC-URL连接后面加上&useUnicode=true&characterEncoding=UTF83.修改my.ini文件去掉sql-mode="STRICT_TRANS_TABLES,NO_A......
  • 检测到 #include 错误。请更新 includePath问题
    一、#include<iostream>标红首先,你没有编译器了,别捅咕了直接去安装一个MinGW参考:MinGW下载和安装教程(biancheng.net) 二、漫长的安装之后,还是不能用,需要配置,参考:(43条消息)vscode检测到#include错误,请更新includePath之解决方法_检测到include错误,请更新includepath_......
  • mysql 启动提示:错误2系统找不到指定文件;
    mysql启动后系统提示错误:mysql启动提示:错误2系统找不到指定文件;问题解决过程:注册表位置: \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\mysql图中所示的位置与拷贝到服务器的mysql部署位置不一致,修改后,系统启动正常。  修改后,mysql正常启动。 ......
  • springboot 自定义listener 添加环境变量。 抄的springboot项目去掉了一些不用的ja
    1.自定义listener实现 ApplicationListener<ApplicationEnvironmentPreparedEvent>,Ordered(如果要设置优先级可以实现Ordered接口,注意order值越小优先级越高)publicclassMyListenerimplementsApplicationListener<ApplicationEnvironmentPreparedEvent>,Ordered{......
  • vue3错误归纳
    1,出错原因,找不到文件npminstall--save@/api/baseInfo/department//这个目录没有文件 2.packjson中那么没改,不知道为什么E:\gh-phm\ruoyi-ui\node_modules\normalize-package-data\lib\fixer.js:336thrownewError("Invalidname:"+JSON.stringify......