Anticheat fastbreak (#3411)
Added block hardness checks when breaking blocks.
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include "ItemSugarcane.h"
|
||||
#include "ItemSword.h"
|
||||
#include "ItemThrowable.h"
|
||||
#include "ItemAxe.h"
|
||||
|
||||
#include "../Blocks/BlockHandler.h"
|
||||
|
||||
@@ -180,6 +181,15 @@ cItemHandler * cItemHandler::CreateItemHandler(int a_ItemType)
|
||||
return new cItemShovelHandler(a_ItemType);
|
||||
}
|
||||
|
||||
case E_ITEM_WOODEN_AXE:
|
||||
case E_ITEM_STONE_AXE:
|
||||
case E_ITEM_IRON_AXE:
|
||||
case E_ITEM_GOLD_AXE:
|
||||
case E_ITEM_DIAMOND_AXE:
|
||||
{
|
||||
return new cItemAxeHandler(a_ItemType);
|
||||
}
|
||||
|
||||
case E_ITEM_WOODEN_SWORD:
|
||||
case E_ITEM_STONE_SWORD:
|
||||
case E_ITEM_IRON_SWORD:
|
||||
@@ -866,3 +876,13 @@ cItemHandler::FoodInfo cItemHandler::GetFoodInfo()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
float cItemHandler::GetBlockBreakingStrength(BLOCKTYPE a_Block)
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user