From dffbf0b5109ae7ae2fd3a1793299a96725ec18dc Mon Sep 17 00:00:00 2001 From: dbhicks Date: Fri, 5 May 2017 21:41:01 -0400 Subject: [PATCH] Adjusted RipeMeta for off by one error (#3691) --- src/Blocks/BlockCrops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Blocks/BlockCrops.h b/src/Blocks/BlockCrops.h index 5ca264774..3563f85fd 100644 --- a/src/Blocks/BlockCrops.h +++ b/src/Blocks/BlockCrops.h @@ -29,7 +29,7 @@ public: cFastRandom rand; // If not fully grown, drop the "seed" of whatever is growing: - if (a_Meta < RipeMeta) + if (a_Meta < (RipeMeta - 1)) { switch (m_BlockType) { @@ -97,7 +97,7 @@ public: // If there is still room to grow and the plant can grow, then grow. // Otherwise if the plant needs to die, then dig it up - if ((Meta < RipeMeta) && (Action == paGrowth)) + if ((Meta < (RipeMeta - 1)) && (Action == paGrowth)) { a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, m_BlockType, ++Meta); }