1
0

WormNestCaves: drills only through specific blocks (FS #259)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@981 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-10-19 20:29:48 +00:00
parent 9a9f15eec6
commit ee15bbcf5d

View File

@ -490,7 +490,29 @@ void cCaveTunnel::ProcessChunk(
int SqDist = (DifX - x) * (DifX - x) + (DifY - y) * (DifY - y) + (DifZ - z) * (DifZ - z); int SqDist = (DifX - x) * (DifX - x) + (DifY - y) * (DifY - y) + (DifZ - z) * (DifZ - z);
if (6 * SqDist <= SqRad) if (6 * SqDist <= SqRad)
{ {
cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_AIR); switch (cChunkDef::GetBlock(a_BlockTypes, x, y, z))
{
// Only carve out these specific block types
case E_BLOCK_DIRT:
case E_BLOCK_GRASS:
case E_BLOCK_STONE:
case E_BLOCK_COBBLESTONE:
case E_BLOCK_GRAVEL:
case E_BLOCK_SAND:
case E_BLOCK_SANDSTONE:
case E_BLOCK_NETHERRACK:
case E_BLOCK_COAL_ORE:
case E_BLOCK_IRON_ORE:
case E_BLOCK_GOLD_ORE:
case E_BLOCK_DIAMOND_ORE:
case E_BLOCK_REDSTONE_ORE:
case E_BLOCK_REDSTONE_ORE_GLOWING:
{
cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_AIR);
break;
}
default: break;
}
} }
} // for y } // for y
} // for x, z } // for x, z