diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-06 18:53:02 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-06 18:53:02 +0200 |
commit | 318f7df037194935b5a716a6a90e3563f4dbbba1 (patch) | |
tree | be9673c6aeacbb9c7fa60e1b3589e79db29543a5 /source/Generating/MineShafts.cpp | |
parent | Tracer: removed the "start and end in the same block" warning, it is a normal condition. (diff) | |
download | cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.tar cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.tar.gz cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.tar.bz2 cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.tar.lz cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.tar.xz cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.tar.zst cuberite-318f7df037194935b5a716a6a90e3563f4dbbba1.zip |
Diffstat (limited to 'source/Generating/MineShafts.cpp')
-rw-r--r-- | source/Generating/MineShafts.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/Generating/MineShafts.cpp b/source/Generating/MineShafts.cpp index ca0580f76..3652e58b8 100644 --- a/source/Generating/MineShafts.cpp +++ b/source/Generating/MineShafts.cpp @@ -640,15 +640,20 @@ void cMineShaftCorridor::ProcessChunk(cChunkDesc & a_ChunkDesc) {
int BlockX = a_ChunkDesc.GetChunkX() * cChunkDef::Width;
int BlockZ = a_ChunkDesc.GetChunkZ() * cChunkDef::Width;
- BLOCKTYPE FillBlock = (m_SpawnerPosition >= 0) ? E_BLOCK_COBWEB : E_BLOCK_AIR;
cCuboid RelBoundingBox(m_BoundingBox);
RelBoundingBox.Move(-BlockX, 0, -BlockZ);
RelBoundingBox.p1.y += 1;
RelBoundingBox.p2.y -= 1;
- a_ChunkDesc.FillRelCuboid(RelBoundingBox, FillBlock, 0);
- RelBoundingBox.p2.y += 1;
- RelBoundingBox.p1.y = RelBoundingBox.p2.y;
- a_ChunkDesc.RandomFillRelCuboid(RelBoundingBox, FillBlock, 0, BlockX ^ BlockZ + BlockX, 8000);
+ cCuboid Top(RelBoundingBox);
+ Top.p2.y += 1;
+ Top.p1.y = Top.p2.y;
+ a_ChunkDesc.FillRelCuboid(RelBoundingBox, E_BLOCK_AIR, 0);
+ a_ChunkDesc.RandomFillRelCuboid(Top, E_BLOCK_AIR, 0, BlockX ^ BlockZ + BlockX, 8000);
+ if (m_SpawnerPosition >= 0)
+ {
+ a_ChunkDesc.RandomFillRelCuboid(RelBoundingBox, E_BLOCK_COBWEB, 0, BlockX ^ BlockZ + BlockZ, 8000);
+ a_ChunkDesc.RandomFillRelCuboid(Top, E_BLOCK_COBWEB, 0, BlockX ^ BlockZ + BlockX, 5000);
+ }
RelBoundingBox.p1.y = m_BoundingBox.p1.y;
RelBoundingBox.p2.y = m_BoundingBox.p1.y;
a_ChunkDesc.FloorRelCuboid(RelBoundingBox, E_BLOCK_PLANKS, 0);
|