summaryrefslogtreecommitdiffstats
path: root/source/Items/ItemPickaxe.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-19 11:39:13 +0200
committermadmaxoft <github@xoft.cz>2013-08-19 11:39:13 +0200
commit1a7912744ff2e0abfeae0d2d75af80d73209580c (patch)
treee5372cdfece1852c00ed7b0219ad77ee82ea1858 /source/Items/ItemPickaxe.h
parentFixed timed event wait on Linux. (diff)
downloadcuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.gz
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.bz2
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.lz
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.xz
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.tar.zst
cuberite-1a7912744ff2e0abfeae0d2d75af80d73209580c.zip
Diffstat (limited to 'source/Items/ItemPickaxe.h')
-rw-r--r--source/Items/ItemPickaxe.h90
1 files changed, 53 insertions, 37 deletions
diff --git a/source/Items/ItemPickaxe.h b/source/Items/ItemPickaxe.h
index 1a2c205c0..bde7f0905 100644
--- a/source/Items/ItemPickaxe.h
+++ b/source/Items/ItemPickaxe.h
@@ -3,9 +3,10 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
-class cItemPickaxeHandler : public cItemHandler
+class cItemPickaxeHandler :
+ public cItemHandler
{
public:
cItemPickaxeHandler(int a_ItemType)
@@ -36,41 +37,56 @@ public:
{
switch(a_BlockType)
{
- case E_BLOCK_OBSIDIAN:
- return PickaxeLevel() >= 4;
- case E_BLOCK_DIAMOND_BLOCK:
- case E_BLOCK_DIAMOND_ORE:
- case E_BLOCK_GOLD_BLOCK:
- case E_BLOCK_GOLD_ORE:
- case E_BLOCK_REDSTONE_ORE:
- case E_BLOCK_REDSTONE_ORE_GLOWING:
- case E_BLOCK_EMERALD_ORE:
- return PickaxeLevel() >= 3;
- case E_BLOCK_IRON_BLOCK:
- case E_BLOCK_IRON_ORE:
- case E_BLOCK_LAPIS_ORE:
- case E_BLOCK_LAPIS_BLOCK:
- return PickaxeLevel() >= 2;
- case E_BLOCK_COAL_ORE:
- case E_BLOCK_STONE:
- case E_BLOCK_COBBLESTONE:
- case E_BLOCK_END_STONE:
- case E_BLOCK_MOSSY_COBBLESTONE:
- case E_BLOCK_SANDSTONE_STAIRS:
- case E_BLOCK_SANDSTONE:
- case E_BLOCK_STONE_BRICKS:
- case E_BLOCK_NETHER_BRICK:
- case E_BLOCK_NETHERRACK:
- case E_BLOCK_STONE_SLAB:
- case E_BLOCK_DOUBLE_STONE_SLAB:
- case E_BLOCK_STONE_PRESSURE_PLATE:
- case E_BLOCK_BRICK:
- case E_BLOCK_COBBLESTONE_STAIRS:
- case E_BLOCK_STONE_BRICK_STAIRS:
- case E_BLOCK_NETHER_BRICK_STAIRS:
- case E_BLOCK_CAULDRON:
- return PickaxeLevel() >= 1;
+ case E_BLOCK_OBSIDIAN:
+ {
+ return PickaxeLevel() >= 4;
+ }
+
+ case E_BLOCK_DIAMOND_BLOCK:
+ case E_BLOCK_DIAMOND_ORE:
+ case E_BLOCK_GOLD_BLOCK:
+ case E_BLOCK_GOLD_ORE:
+ case E_BLOCK_REDSTONE_ORE:
+ case E_BLOCK_REDSTONE_ORE_GLOWING:
+ case E_BLOCK_EMERALD_ORE:
+ {
+ return PickaxeLevel() >= 3;
+ }
+
+ case E_BLOCK_IRON_BLOCK:
+ case E_BLOCK_IRON_ORE:
+ case E_BLOCK_LAPIS_ORE:
+ case E_BLOCK_LAPIS_BLOCK:
+ {
+ return PickaxeLevel() >= 2;
+ }
+
+ case E_BLOCK_COAL_ORE:
+ case E_BLOCK_STONE:
+ case E_BLOCK_COBBLESTONE:
+ case E_BLOCK_END_STONE:
+ case E_BLOCK_MOSSY_COBBLESTONE:
+ case E_BLOCK_SANDSTONE_STAIRS:
+ case E_BLOCK_SANDSTONE:
+ case E_BLOCK_STONE_BRICKS:
+ case E_BLOCK_NETHER_BRICK:
+ case E_BLOCK_NETHERRACK:
+ case E_BLOCK_STONE_SLAB:
+ case E_BLOCK_DOUBLE_STONE_SLAB:
+ case E_BLOCK_STONE_PRESSURE_PLATE:
+ case E_BLOCK_BRICK:
+ case E_BLOCK_COBBLESTONE_STAIRS:
+ case E_BLOCK_STONE_BRICK_STAIRS:
+ case E_BLOCK_NETHER_BRICK_STAIRS:
+ case E_BLOCK_CAULDRON:
+ {
+ return PickaxeLevel() >= 1;
+ }
}
return false;
}
-}; \ No newline at end of file
+} ;
+
+
+
+