首页 > 编程语言 >c++钟楼

c++钟楼

时间:2023-03-18 18:44:53浏览次数:33  
标签:钟楼 15 mc 18 c++ fillBlocks 98 20

#include <iostream>
#include <string>
#include "minecraft.h"
using namespace std;
TxMinecraft mc;
int x,y,z,id,data;
void a(){
	//正方形 
	mc.fillBlocks(x,y-1,z,x+5,y-1,z+5,98,0);
	mc.fillBlocks(x+1,y-1,z+1,x+4,y-1,z+4,0,0);
	mc.fillBlocks(x,y-1,z+15,x+5,y-1,z+5+15,98,0);
	mc.fillBlocks(x+1,y-1,z+1+15,x+4,y-1,z+4+15,0,0); 
	
	mc.fillBlocks(x+15,y-1,z,x+5+15,y-1,z+5,98,0);
	mc.fillBlocks(x+1+15,y-1,z+1,x+4+15,y-1,z+4,0,0);
	mc.fillBlocks(x+15,y-1,z+15,x+5+15,y-1,z+5+15,98,0); 	
	mc.fillBlocks(x+1+15,y-1,z+1+15,x+4+15,y-1,z+4+15,0,0);	
	//边 
	mc.fillBlocks(x+1,y,z+5,x+1,y+2,z+15,98,0);
	mc.fillBlocks(x+1,y+3,z+5,x+1,y+3,z+15,109,0);
	
	mc.fillBlocks(x+18,y,z+5,x+18,y+2,z+15,98,0);
	mc.fillBlocks(x+18,y+3,z+5,x+18,y+3,z+15,109,1);
	
	mc.fillBlocks(x+5,y,z+1,x+15,y+2,z+1,98,0);
	mc.fillBlocks(x+5,y+3,z+1,x+15,y+3,z+1,109,2);
	
	mc.fillBlocks(x+5,y,z+18,x+15,y+2,z+18,98,0);
	mc.fillBlocks(x+5,y+3,z+18,x+15,y+3,z+18,109,3);	
}
void b(){
	mc.fillBlocks(x,y,z,x+5,y+1,z,98,0);
	mc.fillBlocks(x,y,z+20,x+5,y+1,z+20,98,0);
	mc.fillBlocks(x+15,y,z,x+5+15,y+1,z,98,0);
	mc.fillBlocks(x+20,y,z,x+20,y+1,z+5,98,0);
	
	mc.fillBlocks(x+15,y,z+20,x+5+15,y+1,z+20,98,0);
	mc.fillBlocks(x+20,y,z+15,x+20,y+1,z+5+15,98,0);
	
	mc.fillBlocks(x,y,z,x,y+1,z+5,98,0);
	mc.fillBlocks(x,y,z+15,x,y+1,z+5+15,98,0);	
}	
int main() {
bool com=mc.ConnectMinecraft("zk","919b005179e840e1bf78fef437b2f298");
if(!com){
	cout<<"连接失败";
}
bool fly=true;
   mc.setPlayerFly("陈若麟",fly);
   
   cin>>x>>y>>z;
mc.fillBlocks(x,y,z,x+50,y+50,z+50,0,0);
   a();
   b();
	return 0;
}

  

标签:钟楼,15,mc,18,c++,fillBlocks,98,20
From: https://www.cnblogs.com/As10016/p/17231461.html

相关文章

  • 钟楼
    #include<iostream>#include"minecraft.h"usingnamespacestd;TxMinecraftmc;voidno1(intx,inty,intz){intid,data;id=98;data=0;//台阶......
  • c++常用STL库及常用函数
    临近各种算法比赛,相信很多人想笔者一样还总是记不住很多函数的用法,特此总结一下常用的STL标准库以及标准函数,希望能够有所帮助。1.输入输出输入输出一般用两个标准库:#i......
  • c++ 影响多线程速度的因素记录
    目录0.序言1.缓存行同步问题/共享数据竞争1.1测试代码1.2测试逻辑1.3测试结果1.4小结2.任务颗粒度过小问题2.1测试代码2.1测试逻辑2.2测试结果2.3小结3.缓存未......
  • C++ class struct
    classandstruct目录前文问题对象与引用引用的传递对象copyshallowcopydepthcopymemcpy(data,a.data,sizeof(T)*n);简单类型复杂类型指针类型的......
  • C++ const的理解
    const​const修饰的变量不能再作为左值,初始化后值不能被修改C和C++const的区别​C语言中const修饰的值是常变量,不是常量,只是不能作为左值被修改voidmain(){......
  • 周六900C++模拟测试2023.3.18
     2023江南万达校区能力测试说明:1、在桌面以自己名字命名(中文名)建立文件夹;2、文件夹中存储每个题目对应的英文题目名.cpp文件; 中文题目名称小L的能量检测......
  • 第十三届蓝桥杯国赛 C++ B 组 J 题——搬砖(AC)
    目录​​1.搬砖​​​​1.题目描述​​​​2.输入格式​​​​3.输出格式​​​​4.样例输入​​​​5.样例输出​​​​6.数据范围​​​​7.原题链接​​​​2.解题思路​......
  • C++ STL 容器的size_type
    在C++STL容器中,size_type是一个无符号整数类型,用于表示容器中元素的数量或大小。由于不同平台和编译器有不同的实现,因此使用size_type可以确保代码的可移植性和兼容......
  • C++ mutex lock,unlock
    #model/util.h#pragmaonce#include<chrono>#include<ctime>#include<fstream>#include<functional>#include<iomanip>#include<iostream>#include<list>......
  • C++指针总结
    在程序运行时分配的内存空间是需要在运行中释放的,这部分内存称之为堆。智能指针不用自己释放内存,只要没有指针指向内存了,就会自动释放。下面是两种智能指针:shared_ptr允......