summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-09 15:00:14 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-09 15:00:14 +0200
commit8189487258df0490583b52322e357d7f7dfcb0e9 (patch)
tree3e5bf73b613da7a8a98b447982982f5573e1bd46 /source/cChunk.cpp
parentPlants growable by bonemeal are settable in the world.ini. Default matches vanilla MC. (diff)
downloadcuberite-8189487258df0490583b52322e357d7f7dfcb0e9.tar
cuberite-8189487258df0490583b52322e357d7f7dfcb0e9.tar.gz
cuberite-8189487258df0490583b52322e357d7f7dfcb0e9.tar.bz2
cuberite-8189487258df0490583b52322e357d7f7dfcb0e9.tar.lz
cuberite-8189487258df0490583b52322e357d7f7dfcb0e9.tar.xz
cuberite-8189487258df0490583b52322e357d7f7dfcb0e9.tar.zst
cuberite-8189487258df0490583b52322e357d7f7dfcb0e9.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 526300972..21c84b8ce 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -837,8 +837,8 @@ void cChunk::GrowSugarcane(int a_RelX, int a_RelY, int a_RelZ, int a_NumBlocks)
--Bottom;
}
- // Grow by at most a_NumBlocks, but no more than height 3:
- int ToGrow = std::min(a_NumBlocks, 4 - (Top - Bottom));
+ // Grow by at most a_NumBlocks, but no more than max height:
+ int ToGrow = std::min(a_NumBlocks, m_World->GetMaxSugarcaneHeight() + 1 - (Top - Bottom));
for (int i = 0; i < ToGrow; i++)
{
BLOCKTYPE BlockType;
@@ -878,8 +878,8 @@ void cChunk::GrowCactus(int a_RelX, int a_RelY, int a_RelZ, int a_NumBlocks)
--Bottom;
}
- // Grow by at most a_NumBlocks, but no more than height 3:
- int ToGrow = std::min(a_NumBlocks, 4 - (Top - Bottom));
+ // Grow by at most a_NumBlocks, but no more than max height:
+ int ToGrow = std::min(a_NumBlocks, m_World->GetMaxCactusHeight() + 1 - (Top - Bottom));
for (int i = 0; i < ToGrow; i++)
{
BLOCKTYPE BlockType;