1
0
cuberite-2a/src/Generating/EnderDragonFightStructuresGen.h
12xx12 d78bcac150
Obsidian pillars, end fountain, not Ender dragon spawning (#4993)
* added generator for obsidian pillars and central fountain which then is used for the exit portal

* checkstyle

* checkstyle the second

* fixed clang
removed magic number
added Clamp

* make the pillars configurable

* fixed clang
added warning if there was a unknown value if the tower should have a cage or not

* forgot to cancel on unkwon value

* fixed clang this time maybe

* added new generator to generator test

* fixed test

* added prefab generation for end fountain

* fixed checkstyle and updated the prefab

* added ender dragon spawning
made the fountain positioning dynamic
removed fountain placement functions

* added enderdragon stuff to testing

* pls compile

* added changes suggested by @peterbell10

* fixed clang

* added debug for further research on the ARM build

* ok - it wasn't my tower placement

* checking in setup

* readded the fountain schematic

* removed finisher

* readded generator

* removed generator trigger - kept ini file access

* using cChunkDef function to calculate abs pos of endercrystal

* yes, I know it's unused...

* commented everything in the ComposableGenerator.cpp
 - so only the new class in compiled in but not called at all

* don't compile in the new generator at all
(removed from CMakeLists.txt)

* readded the new generator

* readded the new generator

* removed debug output

* made the towers generate acrocc chunk borders

* fixed bad merge

* fixed clang

* fixed clang

* generate the dragon 20 blocks above terrain

* trying to fixed weird undefined reference

* maybe this fixes the weird behaviour

* takes chunk width as parameter now

* added new comments with info to generated structures
removed ender dragon spawning
removed chunkwidth from parameter

* fixed linker

* maybe fixed linking. tried with gc and clang

* fixed ender crystal

* fixed test

* updated output strings

* fixed build

* fixed up test

* fixed test compile

* fixed test - cant get the tests to show up

* removed the semicolon

* maybe this is the fix?

* at this point i have no idea - in MVSC it works

* removed the ender dragon

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2021-04-08 12:18:18 +02:00

39 lines
871 B
C++

#pragma once
/*
https://minecraft.gamepedia.com/End_spike
https://minecraft.gamepedia.com/End_Crystal
https://minecraft.gamepedia.com/Ender_Dragon
*/
#include "FinishGen.h"
class cEnderDragonFightStructuresGen :
public cFinishGen
{
public:
cEnderDragonFightStructuresGen(int a_Seed);
void Init(const AString & a_TowerProperties, int a_Radius);
protected:
struct sTowerProperties
{
Vector3i m_Pos;
int m_Height;
int m_Radius;
bool m_HasCage;
};
cNoise m_Noise;
std::map<cChunkCoords, std::vector<sTowerProperties>> m_TowerPos;
static const std::array<Vector3i, 48> m_CagePos;
static const std::array<Vector3i, 26> m_CageAir;
cBlockArea m_Fountain;
int m_MinX = -1, m_MaxX = 1, m_MinZ = -1, m_MaxZ = 1;
void GenFinish(cChunkDesc &a_ChunkDesc) override;
void PlaceTower(cChunkDesc & a_ChunkDesc, const sTowerProperties & a_TowerProperties);
};