1
0

added check for harvestation in oreblock handler (#5226)

This commit is contained in:
12xx12 2021-05-26 18:07:50 +02:00 committed by GitHub
parent 9ddc3635d6
commit c7febf86e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;