summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPickaxe.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-06 21:46:50 +0200
committerMattes D <github@xoft.cz>2014-05-06 21:46:50 +0200
commit66c5c81e02dd9350542e1dd65b8e33c2f45a011b (patch)
treee719f55d50354e881c8ace1ca83516596519abaf /src/Items/ItemPickaxe.h
parentMerge pull request #927 from mc-server/fixes (diff)
parentRename CanRepairWithItem to CanRepairWithRawMaterial and rename Size() to Count() (diff)
downloadcuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.gz
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.bz2
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.lz
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.xz
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.tar.zst
cuberite-66c5c81e02dd9350542e1dd65b8e33c2f45a011b.zip
Diffstat (limited to 'src/Items/ItemPickaxe.h')
-rw-r--r--src/Items/ItemPickaxe.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Items/ItemPickaxe.h b/src/Items/ItemPickaxe.h
index 2a8e40daa..ff2c2069b 100644
--- a/src/Items/ItemPickaxe.h
+++ b/src/Items/ItemPickaxe.h
@@ -85,6 +85,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;
+ }
} ;