From d78bcac15035ddd096df6187a36e630071cba5c4 Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Thu, 8 Apr 2021 12:18:18 +0200 Subject: 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> --- src/Generating/EnderDragonFightStructuresGen.h | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/Generating/EnderDragonFightStructuresGen.h (limited to 'src/Generating/EnderDragonFightStructuresGen.h') diff --git a/src/Generating/EnderDragonFightStructuresGen.h b/src/Generating/EnderDragonFightStructuresGen.h new file mode 100644 index 000000000..be6b2506e --- /dev/null +++ b/src/Generating/EnderDragonFightStructuresGen.h @@ -0,0 +1,38 @@ + +#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> m_TowerPos; + static const std::array m_CagePos; + static const std::array 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); +}; -- cgit v1.2.3