diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-09-28 19:27:08 +0200 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-09-28 19:27:08 +0200 |
commit | 76e0c592ef2f9660f10ab099cb8e8cbffc35153b (patch) | |
tree | 8ba5a41c9c22e226af5588ef0048a4d9450fde51 /src/Generating/StructGen.cpp | |
parent | Merge pull request #1463 from mc-server/sp_docs (diff) | |
download | cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.tar cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.tar.gz cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.tar.bz2 cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.tar.lz cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.tar.xz cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.tar.zst cuberite-76e0c592ef2f9660f10ab099cb8e8cbffc35153b.zip |
Diffstat (limited to 'src/Generating/StructGen.cpp')
-rw-r--r-- | src/Generating/StructGen.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Generating/StructGen.cpp b/src/Generating/StructGen.cpp index 731324b0d..c23a72621 100644 --- a/src/Generating/StructGen.cpp +++ b/src/Generating/StructGen.cpp @@ -272,13 +272,14 @@ void cStructGenOreNests::GenFinish(cChunkDesc & a_ChunkDesc) int ChunkX = a_ChunkDesc.GetChunkX(); int ChunkZ = a_ChunkDesc.GetChunkZ(); cChunkDef::BlockTypes & BlockTypes = a_ChunkDesc.GetBlockTypes(); + cChunkDesc::BlockNibbleBytes & BlockMetas = a_ChunkDesc.GetBlockMetasUncompressed(); int seq = 1; // Generate the ores from the ore list. for (OreList::const_iterator itr = m_OreList.begin(); itr != m_OreList.end(); ++itr) { - GenerateOre(ChunkX, ChunkZ, itr->BlockType, itr->MaxHeight, itr->NumNests, itr->NestSize, BlockTypes, seq); + GenerateOre(ChunkX, ChunkZ, itr->BlockType, itr->BlockMeta, itr->MaxHeight, itr->NumNests, itr->NestSize, BlockTypes, BlockMetas, seq); seq++; } } @@ -287,7 +288,7 @@ void cStructGenOreNests::GenFinish(cChunkDesc & a_ChunkDesc) -void cStructGenOreNests::GenerateOre(int a_ChunkX, int a_ChunkZ, BLOCKTYPE a_OreType, int a_MaxHeight, int a_NumNests, int a_NestSize, cChunkDef::BlockTypes & a_BlockTypes, int a_Seq) +void cStructGenOreNests::GenerateOre(int a_ChunkX, int a_ChunkZ, BLOCKTYPE a_OreType, NIBBLETYPE a_BlockMeta, int a_MaxHeight, int a_NumNests, int a_NestSize, cChunkDef::BlockTypes & a_BlockTypes, cChunkDesc::BlockNibbleBytes & a_BlockMetas, int a_Seq) { // This function generates several "nests" of ore, each nest consisting of number of ore blocks relatively adjacent to each other. // It does so by making a random XYZ walk and adding ore along the way in cuboids of different (random) sizes @@ -341,6 +342,7 @@ void cStructGenOreNests::GenerateOre(int a_ChunkX, int a_ChunkZ, BLOCKTYPE a_Ore if (a_BlockTypes[Index] == m_ToReplace) { a_BlockTypes[Index] = a_OreType; + a_BlockMetas[Index] = a_BlockMeta; } Num++; } // for z |