From b6b7fb1a6549ba0c92c5db141af6f6f9bc1d3038 Mon Sep 17 00:00:00 2001 From: KingCol13 <48412633+KingCol13@users.noreply.github.com> Date: Sun, 20 Sep 2020 19:06:28 +0100 Subject: Implement fortune for ores, glowstone and sea lanterns (#4897) * Implemented fortune for ores, glowstone and sea lanterns (but nothing organic or flint). * Cleanup printf * Stopped playing golf, gave the Camels a FirstHump and moved the FortuneDropMult comment. Thanks for the review :). * Got rid of FortuneDropMult and replaced with Peter's massive optimization/simplification. * Fixed default lapis max droprate (8 -> 9). * Clamp max drops for non-redstone ores to 10. * Comment justifying the clamp. --- src/Blocks/BlockHandler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Blocks/BlockHandler.h') diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h index 447fc7dc6..8d595cc4a 100644 --- a/src/Blocks/BlockHandler.h +++ b/src/Blocks/BlockHandler.h @@ -230,6 +230,10 @@ public: Helper used in many ConvertToPickups() implementations. */ static bool ToolHasSilkTouch(const cItem * a_Tool); + /** Returns the fortune level of a tool, if it is a valid tool. + Can be used in ConvertToPickups() implementations. */ + static unsigned int ToolFortuneLevel(const cItem * a_Tool); + // Gets the blockhandler for the given block type. static const cBlockHandler & For(BLOCKTYPE a_BlockType); -- cgit v1.2.3