1
0

DebugBiomes composition generator now uses only blocks suitable for terrain (from an internal list)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@510 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-05-27 14:05:36 +00:00
parent 5d4e9e18da
commit fbc497b97d

View File

@ -67,6 +67,33 @@ void cCompoGenDebugBiomes::ComposeTerrain(
cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...) cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...)
) )
{ {
static BLOCKTYPE Blocks[] =
{
E_BLOCK_STONE,
E_BLOCK_COBBLESTONE,
E_BLOCK_LOG,
E_BLOCK_PLANKS,
E_BLOCK_SANDSTONE,
E_BLOCK_WHITE_CLOTH,
E_BLOCK_COAL_ORE,
E_BLOCK_IRON_ORE,
E_BLOCK_GOLD_ORE,
E_BLOCK_DIAMOND_ORE,
E_BLOCK_LAPIS_ORE,
E_BLOCK_REDSTONE_ORE,
E_BLOCK_IRON_BLOCK,
E_BLOCK_GOLD_BLOCK,
E_BLOCK_DIAMOND_BLOCK,
E_BLOCK_LAPIS_BLOCK,
E_BLOCK_BRICK,
E_BLOCK_MOSSY_COBBLESTONE,
E_BLOCK_OBSIDIAN,
E_BLOCK_NETHERRACK,
E_BLOCK_SOULSAND,
E_BLOCK_NETHER_BRICK,
E_BLOCK_BEDROCK,
} ;
memset(a_BlockTypes, E_BLOCK_AIR, sizeof(a_BlockTypes)); memset(a_BlockTypes, E_BLOCK_AIR, sizeof(a_BlockTypes));
memset(a_BlockMeta, 0, sizeof(a_BlockMeta)); memset(a_BlockMeta, 0, sizeof(a_BlockMeta));
@ -77,7 +104,7 @@ void cCompoGenDebugBiomes::ComposeTerrain(
{ {
for (int x = 0; x < cChunkDef::Width; x++) for (int x = 0; x < cChunkDef::Width; x++)
{ {
BLOCKTYPE BlockType = (BLOCKTYPE)cChunkDef::GetBiome(BiomeMap, x, z); BLOCKTYPE BlockType = Blocks[cChunkDef::GetBiome(BiomeMap, x, z) % ARRAYCOUNT(Blocks)];
for (int y = a_HeightMap[x + cChunkDef::Width * z]; y >= 0; y--) for (int y = a_HeightMap[x + cChunkDef::Width * z]; y >= 0; y--)
{ {
cChunkDef::SetBlock(a_BlockTypes, x, y, z, BlockType); cChunkDef::SetBlock(a_BlockTypes, x, y, z, BlockType);