From c7febf86e97f9568b14a79119620028673ae53ee Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Wed, 26 May 2021 18:07:50 +0200 Subject: added check for harvestation in oreblock handler (#5226) --- src/Blocks/BlockOre.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3