From 8eca58a1c9d3ea928b301de1ad772a46164372e1 Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Mon, 28 Sep 2020 13:41:49 +0100 Subject: Fortune Drops (#4932) + Implemented and standardized all clamped discrete random drops. + Changed cItems Add from push_back to emplace_back. Implement fortune for crops. + Enabled hoes to be enchanted with efficiency, silk touch and fortune. Made leaves, gravel and crops affected by fortune. Co-authored-by: Tiger Wang --- src/Blocks/BlockNetherWart.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Blocks/BlockNetherWart.h') diff --git a/src/Blocks/BlockNetherWart.h b/src/Blocks/BlockNetherWart.h index 590a55772..dde6b17d4 100644 --- a/src/Blocks/BlockNetherWart.h +++ b/src/Blocks/BlockNetherWart.h @@ -24,13 +24,11 @@ private: if (a_BlockMeta == 0x03) { // Fully grown, drop the entire produce: - auto & rand = GetRandomProvider(); - return cItem(E_ITEM_NETHER_WART, 1 + (rand.RandInt(2) + rand.RandInt(2)) / 2, 0); - } - else - { - return cItem(E_ITEM_NETHER_WART); + const auto DropNum = FortuneDiscreteRandom(2, 4, ToolFortuneLevel(a_Tool)); + return cItem(E_ITEM_NETHER_WART, DropNum); } + + return cItem(E_ITEM_NETHER_WART); } -- cgit v1.2.3