diff options
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockCrops.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Blocks/BlockCrops.h b/src/Blocks/BlockCrops.h index 827b26881..aab2c18cd 100644 --- a/src/Blocks/BlockCrops.h +++ b/src/Blocks/BlockCrops.h @@ -10,7 +10,7 @@ /** Common class that takes care of beetroots, carrots, potatoes and wheat */ template <NIBBLETYPE RipeMeta> -class cBlockCropsHandler: +class cBlockCropsHandler final : public cBlockPlant<true> { using Super = cBlockPlant<true>; @@ -22,10 +22,10 @@ public: private: /** Calculate the number of seeds to drop when the crop is broken. */ - static char CalculateSeedCount(char a_Min, char a_BaseRolls, char a_FortuneLevel) + static char CalculateSeedCount(char a_Min, char a_BaseRolls, unsigned char a_FortuneLevel) { - std::binomial_distribution Binomial(a_BaseRolls + a_FortuneLevel, 0.57); - return a_Min + Binomial(GetRandomProvider().Engine()); + std::binomial_distribution<> Binomial(a_BaseRolls + a_FortuneLevel, 0.57); + return static_cast<char>(a_Min + Binomial(GetRandomProvider().Engine())); } |