diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-08 17:39:43 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-18 00:44:42 +0100 |
commit | 5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c (patch) | |
tree | ea5f79ad71456dcbf4f658a61cc259ac4e6e7d79 /src/Generating/SinglePieceStructuresGen.cpp | |
parent | Add heraldry names to banner pattern API docs (diff) | |
download | cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.gz cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.bz2 cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.lz cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.xz cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.tar.zst cuberite-5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c.zip |
Diffstat (limited to 'src/Generating/SinglePieceStructuresGen.cpp')
-rw-r--r-- | src/Generating/SinglePieceStructuresGen.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Generating/SinglePieceStructuresGen.cpp b/src/Generating/SinglePieceStructuresGen.cpp index 84b246715..fb6dcd67d 100644 --- a/src/Generating/SinglePieceStructuresGen.cpp +++ b/src/Generating/SinglePieceStructuresGen.cpp @@ -14,10 +14,10 @@ class cSinglePieceStructuresGen::cGen : { using Super = cGridStructGen; public: - cGen(int a_Seed, cBiomeGenPtr a_BiomeGen, cTerrainHeightGenPtr a_HeightGen, int a_SeaLevel, const AString & a_Name): + cGen(int a_Seed, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_SeaLevel, const AString & a_Name): Super(a_Seed), - m_BiomeGen(std::move(a_BiomeGen)), - m_HeightGen(std::move(a_HeightGen)), + m_BiomeGen(a_BiomeGen), + m_HeightGen(a_HeightGen), m_SeaLevel(a_SeaLevel), m_Name(a_Name) { @@ -61,7 +61,7 @@ public: int ChunkX, ChunkZ; cChunkDef::BlockToChunk(a_OriginX, a_OriginZ, ChunkX, ChunkZ); cChunkDef::BiomeMap Biomes; - m_BiomeGen->GenBiomes({ChunkX, ChunkZ}, Biomes); + m_BiomeGen.GenBiomes({ChunkX, ChunkZ}, Biomes); // Checks if the biome at the origin position is allowed auto Relative = cChunkDef::AbsoluteToRelative(Vector3i(a_OriginX, 1, a_OriginZ), {ChunkX, ChunkZ}); @@ -132,10 +132,10 @@ public: protected: /** The underlying biome generator that defines whether the structure is created or not */ - cBiomeGenPtr m_BiomeGen; + cBiomeGen & m_BiomeGen; /** The underlying height generator, used to position the prefabs crossing chunk borders if they are set to FitGround. */ - cTerrainHeightGenPtr m_HeightGen; + cTerrainHeightGen & m_HeightGen; /** The world's sea level, if available. Used for some cVerticalStrategy descendants. */ int m_SeaLevel; @@ -160,7 +160,7 @@ cSinglePieceStructuresGen::cSinglePieceStructuresGen(int a_Seed) : -bool cSinglePieceStructuresGen::Initialize(const AString & a_Prefabs, int a_SeaLevel, const cBiomeGenPtr & a_BiomeGen, const cTerrainHeightGenPtr & a_HeightGen) +bool cSinglePieceStructuresGen::Initialize(const AString & a_Prefabs, int a_SeaLevel, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen) { // Load each piecepool: auto Structures = StringSplitAndTrim(a_Prefabs, "|"); |