summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockSeaLantern.h
diff options
context:
space:
mode:
authorKingCol13 <48412633+KingCol13@users.noreply.github.com>2020-09-28 14:41:49 +0200
committerGitHub <noreply@github.com>2020-09-28 14:41:49 +0200
commit8eca58a1c9d3ea928b301de1ad772a46164372e1 (patch)
tree9627cfb9c43ed9b332a493c474e7ebe119543b89 /src/Blocks/BlockSeaLantern.h
parentEnchanting consumes lapis, removes correct number of levels (#4934) (diff)
downloadcuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.tar
cuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.tar.gz
cuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.tar.bz2
cuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.tar.lz
cuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.tar.xz
cuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.tar.zst
cuberite-8eca58a1c9d3ea928b301de1ad772a46164372e1.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockSeaLantern.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Blocks/BlockSeaLantern.h b/src/Blocks/BlockSeaLantern.h
index 9804642ca..d3adc95f4 100644
--- a/src/Blocks/BlockSeaLantern.h
+++ b/src/Blocks/BlockSeaLantern.h
@@ -23,15 +23,11 @@ private:
// Drop self only when using silk-touch:
if (ToolHasSilkTouch(a_Tool))
{
- return cItem(E_BLOCK_SEA_LANTERN, 1, 0);
+ return cItem(E_BLOCK_SEA_LANTERN);
}
// Number of crystals to drop, capped at the max amount of 5.
- const auto Drops = std::min(
- static_cast<char>(5),
- GetRandomProvider().RandInt<char>(2, 3 + ToolFortuneLevel(a_Tool))
- );
-
- return cItem(E_ITEM_PRISMARINE_CRYSTALS, Drops);
+ const auto DropNum = FortuneDiscreteRandom(2, 3, ToolFortuneLevel(a_Tool), 5);
+ return cItem(E_ITEM_PRISMARINE_CRYSTALS, DropNum);
}
} ;