summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
Diffstat (limited to 'source/Items')
-rw-r--r--source/Items/ItemDye.h2
-rw-r--r--source/Items/ItemHandler.cpp2
-rw-r--r--source/Items/ItemHoe.h15
-rw-r--r--source/Items/ItemLighter.h4
-rw-r--r--source/Items/ItemMinecart.h3
-rw-r--r--source/Items/ItemPickaxe.h90
-rw-r--r--source/Items/ItemShears.h2
-rw-r--r--source/Items/ItemShovel.h2
-rw-r--r--source/Items/ItemSpawnEgg.h2
-rw-r--r--source/Items/ItemSword.h15
10 files changed, 85 insertions, 52 deletions
diff --git a/source/Items/ItemDye.h b/source/Items/ItemDye.h
index 984d452b7..99b8d2543 100644
--- a/source/Items/ItemDye.h
+++ b/source/Items/ItemDye.h
@@ -3,7 +3,7 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
diff --git a/source/Items/ItemHandler.cpp b/source/Items/ItemHandler.cpp
index a831bb713..66d36e1a6 100644
--- a/source/Items/ItemHandler.cpp
+++ b/source/Items/ItemHandler.cpp
@@ -3,7 +3,7 @@
#include "ItemHandler.h"
#include "../Item.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
#include "../FastRandom.h"
// Handlers:
diff --git a/source/Items/ItemHoe.h b/source/Items/ItemHoe.h
index 577463f21..7b6b3e6ac 100644
--- a/source/Items/ItemHoe.h
+++ b/source/Items/ItemHoe.h
@@ -3,9 +3,14 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
-class cItemHoeHandler : public cItemHandler
+
+
+
+
+class cItemHoeHandler :
+ public cItemHandler
{
public:
cItemHoeHandler(int a_ItemType)
@@ -28,4 +33,8 @@ public:
}
return false;
}
-}; \ No newline at end of file
+} ;
+
+
+
+
diff --git a/source/Items/ItemLighter.h b/source/Items/ItemLighter.h
index cf7822832..39534c7b1 100644
--- a/source/Items/ItemLighter.h
+++ b/source/Items/ItemLighter.h
@@ -3,8 +3,8 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
-#include "../TNTEntity.h"
+#include "../Entities/Player.h"
+#include "../Entities/TNTEntity.h"
diff --git a/source/Items/ItemMinecart.h b/source/Items/ItemMinecart.h
index df970638e..f8eb31a49 100644
--- a/source/Items/ItemMinecart.h
+++ b/source/Items/ItemMinecart.h
@@ -9,8 +9,7 @@
#pragma once
-// Not needed, we're being included only from ItemHandler.cpp which already has this file: #include "ItemHandler.h"
-#include "../Minecart.h"
+#include "../Entities/Minecart.h"
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
+} ;
+
+
+
+
diff --git a/source/Items/ItemShears.h b/source/Items/ItemShears.h
index a904dd1ae..663fa0170 100644
--- a/source/Items/ItemShears.h
+++ b/source/Items/ItemShears.h
@@ -3,7 +3,7 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
diff --git a/source/Items/ItemShovel.h b/source/Items/ItemShovel.h
index a26e7d34e..d0625ef1c 100644
--- a/source/Items/ItemShovel.h
+++ b/source/Items/ItemShovel.h
@@ -3,7 +3,7 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
#include "../Blocks/BlockHandler.h"
diff --git a/source/Items/ItemSpawnEgg.h b/source/Items/ItemSpawnEgg.h
index 5ba0c0ad5..26dd15b7d 100644
--- a/source/Items/ItemSpawnEgg.h
+++ b/source/Items/ItemSpawnEgg.h
@@ -3,7 +3,7 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
diff --git a/source/Items/ItemSword.h b/source/Items/ItemSword.h
index 15351b55c..a7c1d2432 100644
--- a/source/Items/ItemSword.h
+++ b/source/Items/ItemSword.h
@@ -3,9 +3,14 @@
#include "ItemHandler.h"
#include "../World.h"
-#include "../Player.h"
+#include "../Entities/Player.h"
-class cItemSwordHandler : public cItemHandler
+
+
+
+
+class cItemSwordHandler :
+ public cItemHandler
{
public:
cItemSwordHandler(int a_ItemType)
@@ -18,4 +23,8 @@ public:
{
return (a_BlockType == E_BLOCK_COBWEB);
}
-}; \ No newline at end of file
+} ;
+
+
+
+