Skip to content

Commit

Permalink
Merge pull request #1794 from mc-server/MesaPlateauF
Browse files Browse the repository at this point in the history
Mesa plateau F
  • Loading branch information
madmaxoft committed Mar 8, 2015
2 parents 3d81b00 + d19f2a4 commit 5b74987
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
14 changes: 14 additions & 0 deletions src/Generating/CompoGenBiomal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,20 @@ class cCompoGenBiomal :
HasHadWater = true;
} // for y
a_ChunkDesc.SetBlockType(a_RelX, 0, a_RelZ, E_BLOCK_BEDROCK);

EMCSBiome MesaVersion = a_ChunkDesc.GetBiome(a_RelX, a_RelZ);
if ((MesaVersion == biMesaPlateauF) || (MesaVersion == biMesaPlateauFM))
{
if (Top < 95 + static_cast<int>(m_MesaFloor.CubicNoise2D(NoiseY * 2, NoiseX * 2) * 6))
{
return;
}

BLOCKTYPE Block = (m_MesaFloor.CubicNoise2D(NoiseX * 4, NoiseY * 4) < 0) ? E_BLOCK_DIRT : E_BLOCK_GRASS;
NIBBLETYPE Meta = (Block == E_BLOCK_GRASS) ? 0 : 1;

a_ChunkDesc.SetBlockTypeMeta(a_RelX, Top, a_RelZ, Block, Meta);
}
}


Expand Down
16 changes: 10 additions & 6 deletions src/Generating/Trees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
case biMegaTaiga:
case biMegaTaigaHills:
case biExtremeHillsPlus:
case biMesa:
case biMesaPlateauF:
case biMesaPlateau:
case biSunflowerPlains:
case biDesertM:
case biExtremeHillsM:
Expand All @@ -239,9 +236,6 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
case biMegaSpruceTaiga:
case biMegaSpruceTaigaHills:
case biExtremeHillsPlusM:
case biMesaBryce:
case biMesaPlateauFM:
case biMesaPlateauM:
{
// TODO: These need their special trees
GetBirchTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
Expand All @@ -264,6 +258,16 @@ void GetTreeImageByBiome(int a_BlockX, int a_BlockY, int a_BlockZ, cNoise & a_No
return;
}

case biMesa:
case biMesaPlateauF:
case biMesaPlateau:
case biMesaBryce:
case biMesaPlateauFM:
case biMesaPlateauM:
{
GetSmallAppleTreeImage(a_BlockX, a_BlockY, a_BlockZ, a_Noise, a_Seq, a_LogBlocks, a_OtherBlocks);
}

case biDesert:
case biDesertHills:
case biRiver:
Expand Down

0 comments on commit 5b74987

Please sign in to comment.