summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemDye.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-11-11 22:02:29 +0100
committerGitHub <noreply@github.com>2021-11-11 22:02:29 +0100
commitd49ce751ba6f8f2eb171633cea30a1119935f8c7 (patch)
tree25cb23102c0d778cada555c0c25e6dc3247a6514 /src/Items/ItemDye.h
parentPrevent placing of hangables on illegal blocks and break when support block broken (#5301) (diff)
downloadcuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar
cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.gz
cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.bz2
cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.lz
cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.xz
cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.tar.zst
cuberite-d49ce751ba6f8f2eb171633cea30a1119935f8c7.zip
Diffstat (limited to 'src/Items/ItemDye.h')
-rw-r--r--src/Items/ItemDye.h11
1 files changed, 4 insertions, 7 deletions
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