summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-19 22:29:48 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-19 22:29:48 +0200
commitee15bbcf5dd7c10f5b5c653f45c208860c6d2af0 (patch)
treec42a6a65f1ac65b24a7f2773c6fc23a6574b325d
parentFluids will wash away crops and sugarcane. (diff)
downloadcuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.tar
cuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.tar.gz
cuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.tar.bz2
cuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.tar.lz
cuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.tar.xz
cuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.tar.zst
cuberite-ee15bbcf5dd7c10f5b5c653f45c208860c6d2af0.zip
-rw-r--r--source/Generating/Caves.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/Generating/Caves.cpp b/source/Generating/Caves.cpp
index f334023ce..524bc37c7 100644
--- a/source/Generating/Caves.cpp
+++ b/source/Generating/Caves.cpp
@@ -490,7 +490,29 @@ void cCaveTunnel::ProcessChunk(
int SqDist = (DifX - x) * (DifX - x) + (DifY - y) * (DifY - y) + (DifZ - z) * (DifZ - z);
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 x, z