From d49ce751ba6f8f2eb171633cea30a1119935f8c7 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 11 Nov 2021 21:02:29 +0000 Subject: Miscellaneous fixes (#5320) * Protocol: update Abilities flags + Add Spectator handling * BioGen: move include * ClientHandle: rename Respawn packet dimension check flag * Make it clearer what it's doing. * ClientHandle: move ProcessProtocolIn calls to World * Player: remove some redundant initialisation * Player: UpdateCapabilities enables flight for spectators * Produce growth: improve comments * ClientHandle: run unload checks using delta time * Fix forgotten initialisation of time member --- src/Items/ItemDye.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Items') diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h index 683e8a73f..38cc2e4b2 100644 --- a/src/Items/ItemDye.h +++ b/src/Items/ItemDye.h @@ -128,21 +128,18 @@ public: case E_BLOCK_BEETROOTS: { + // Fix GH #4805. + // Bonemeal should only advance growth, not spawn produce, and should not be consumed if plant at maturity: if (a_World.GrowPlantAt(a_BlockPos, 1) <= 0) { - // Fix GH #4805 (bonemeal should only advance growth, not spawn produce): return false; } - a_World.BroadcastSoundParticleEffect(EffectID::PARTICLE_HAPPY_VILLAGER, a_BlockPos, 0); - - // 75% chance of 1-stage growth: - if (!GetRandomProvider().RandBool(0.75)) + if (GetRandomProvider().RandBool(0.25)) { - // Hit the 25%, rollback: + // 75% chance of 1-stage growth, but we hit the 25%, rollback: a_World.GrowPlantAt(a_BlockPos, -1); } - return true; } // case beetroots -- cgit v1.2.3