diff options
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 67cef6cd5..4272bc607 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -649,6 +649,22 @@ bool cBlockHandler::ToolHasSilkTouch(const cItem * a_Tool) +unsigned int cBlockHandler::ToolFortuneLevel(const cItem * a_Tool) +{ + if (a_Tool != nullptr) + { + return a_Tool->m_Enchantments.GetLevel(cEnchantments::enchFortune); + } + else // Not a tool + { + return 0; + } +} + + + + + const cBlockHandler & cBlockHandler::For(BLOCKTYPE a_BlockType) { // Switch on the block type, as an enumeration |