summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemHandler.cpp')
-rw-r--r--src/Items/ItemHandler.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index caa623abc..9272a723d 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -83,7 +83,7 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType)
memset(m_ItemHandler, 0, sizeof(m_ItemHandler));
m_HandlerInitialized = true;
}
- if (m_ItemHandler[a_ItemType] == NULL)
+ if (m_ItemHandler[a_ItemType] == nullptr)
{
m_ItemHandler[a_ItemType] = CreateItemHandler(a_ItemType);
}
@@ -278,7 +278,7 @@ void cItemHandler::Deinit()
for (int i = 0; i < 2267; i++)
{
delete m_ItemHandler[i];
- m_ItemHandler[i] = NULL;
+ m_ItemHandler[i] = nullptr;
}
memset(m_ItemHandler, 0, sizeof(m_ItemHandler)); // Don't leave any dangling pointers around, just in case
m_HandlerInitialized = false;
@@ -572,8 +572,11 @@ bool cItemHandler::CanHarvestBlock(BLOCKTYPE a_BlockType)
case E_BLOCK_COBBLESTONE:
case E_BLOCK_COBBLESTONE_STAIRS:
case E_BLOCK_COBBLESTONE_WALL:
+ case E_BLOCK_COBWEB:
+ case E_BLOCK_DEAD_BUSH:
case E_BLOCK_DIAMOND_BLOCK:
case E_BLOCK_DIAMOND_ORE:
+ case E_BLOCK_DOUBLE_NEW_STONE_SLAB:
case E_BLOCK_DOUBLE_STONE_SLAB:
case E_BLOCK_EMERALD_ORE:
case E_BLOCK_ENCHANTMENT_TABLE:
@@ -587,6 +590,7 @@ bool cItemHandler::CanHarvestBlock(BLOCKTYPE a_BlockType)
case E_BLOCK_LAPIS_BLOCK:
case E_BLOCK_LAPIS_ORE:
case E_BLOCK_LIT_FURNACE:
+ case E_BLOCK_MOB_SPAWNER:
case E_BLOCK_MOSSY_COBBLESTONE:
case E_BLOCK_NETHER_BRICK:
case E_BLOCK_NETHER_BRICK_STAIRS:
@@ -594,6 +598,7 @@ bool cItemHandler::CanHarvestBlock(BLOCKTYPE a_BlockType)
case E_BLOCK_NETHERRACK:
case E_BLOCK_NEW_STONE_SLAB:
case E_BLOCK_OBSIDIAN:
+ case E_BLOCK_PACKED_ICE:
case E_BLOCK_PRISMARINE_BLOCK:
case E_BLOCK_RED_SANDSTONE:
case E_BLOCK_RED_SANDSTONE_STAIRS:
@@ -608,8 +613,6 @@ bool cItemHandler::CanHarvestBlock(BLOCKTYPE a_BlockType)
case E_BLOCK_STONE_PRESSURE_PLATE:
case E_BLOCK_STONE_SLAB:
case E_BLOCK_VINES:
- case E_BLOCK_PACKED_ICE:
- case E_BLOCK_MOB_SPAWNER:
{
return false;
}