diff options
author | 12xx12 <44411062+12xx12@users.noreply.github.com> | 2021-05-26 18:07:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-26 18:07:50 +0200 |
commit | c7febf86e97f9568b14a79119620028673ae53ee (patch) | |
tree | d785a5658f16194632f3e8f1dc0e702b761002b5 /src | |
parent | Implemented cServer::ScheduleTask() and cServer::TickQueuedTasks() (#5224) (diff) | |
download | cuberite-c7febf86e97f9568b14a79119620028673ae53ee.tar cuberite-c7febf86e97f9568b14a79119620028673ae53ee.tar.gz cuberite-c7febf86e97f9568b14a79119620028673ae53ee.tar.bz2 cuberite-c7febf86e97f9568b14a79119620028673ae53ee.tar.lz cuberite-c7febf86e97f9568b14a79119620028673ae53ee.tar.xz cuberite-c7febf86e97f9568b14a79119620028673ae53ee.tar.zst cuberite-c7febf86e97f9568b14a79119620028673ae53ee.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockOre.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Blocks/BlockOre.h b/src/Blocks/BlockOre.h index af67ccc4c..3bd193ee3 100644 --- a/src/Blocks/BlockOre.h +++ b/src/Blocks/BlockOre.h @@ -1,7 +1,8 @@ #pragma once -#include "BlockHandler.h" +#include "Blocks/BlockHandler.h" +#include "Items/ItemHandler.h" @@ -93,6 +94,11 @@ private: return; } + if (!ItemHandler(Player->GetEquippedItem().m_ItemType)->CanHarvestBlock(m_BlockType)) + { + return; + } + auto & Random = GetRandomProvider(); int Reward = 0; |