summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPickaxe.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-05-10 14:05:44 +0200
committerTycho <work.tycho+git@gmail.com>2014-05-10 14:05:44 +0200
commitd478e3cfb19c0347ba0b5513d3250af9d69443de (patch)
treeaaba81bda1ee2e53e5e4d9fdad0c2998ba8edb0f /src/Items/ItemPickaxe.h
parentMaybe coverage working? (diff)
parentMerge pull request #992 from mc-server/coverity_fixes (diff)
downloadcuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.gz
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.bz2
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.lz
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.xz
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.tar.zst
cuberite-d478e3cfb19c0347ba0b5513d3250af9d69443de.zip
Diffstat (limited to 'src/Items/ItemPickaxe.h')
-rw-r--r--src/Items/ItemPickaxe.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Items/ItemPickaxe.h b/src/Items/ItemPickaxe.h
index 2a8e40daa..82bec52d4 100644
--- a/src/Items/ItemPickaxe.h
+++ b/src/Items/ItemPickaxe.h
@@ -76,6 +76,7 @@ public:
case E_BLOCK_STONE_PRESSURE_PLATE:
case E_BLOCK_BRICK:
case E_BLOCK_COBBLESTONE_STAIRS:
+ case E_BLOCK_COBBLESTONE_WALL:
case E_BLOCK_STONE_BRICK_STAIRS:
case E_BLOCK_NETHER_BRICK_STAIRS:
case E_BLOCK_CAULDRON:
@@ -85,6 +86,19 @@ public:
}
return false;
}
+
+ virtual bool CanRepairWithRawMaterial(short a_ItemType) override
+ {
+ switch (m_ItemType)
+ {
+ case E_ITEM_WOODEN_PICKAXE: return (a_ItemType == E_BLOCK_PLANKS);
+ case E_ITEM_STONE_PICKAXE: return (a_ItemType == E_BLOCK_COBBLESTONE);
+ case E_ITEM_IRON_PICKAXE: return (a_ItemType == E_ITEM_IRON);
+ case E_ITEM_GOLD_PICKAXE: return (a_ItemType == E_ITEM_GOLD);
+ case E_ITEM_DIAMOND_PICKAXE: return (a_ItemType == E_ITEM_DIAMOND);
+ }
+ return false;
+ }
} ;