summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPlant.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPlant.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Blocks/BlockPlant.h b/src/Blocks/BlockPlant.h
index 71890b3cf..ab3f137a5 100644
--- a/src/Blocks/BlockPlant.h
+++ b/src/Blocks/BlockPlant.h
@@ -150,7 +150,10 @@ private:
{
case paGrowth:
{
- Grow(a_Chunk, a_RelPos);
+ if (Grow(a_Chunk, a_RelPos) == 0)
+ {
+ BearFruit(a_Chunk, a_RelPos);
+ }
break;
}
case paDeath:
@@ -161,4 +164,10 @@ private:
case paStay: break; // do nothing
}
}
+
+ /** Grows the final produce next to the stem at the specified position. */
+ virtual void BearFruit(cChunk & a_Chunk, const Vector3i a_StemRelPos) const
+ {
+ // Nothing to do by default
+ }
};