diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-16 15:30:33 +0200 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-16 15:30:33 +0200 |
commit | ba70a151915bb14ddbe0527d8807508000819df6 (patch) | |
tree | 3d6d465e35067921809d3c5dc5c45d796934ad85 /source/blocks/Block.cpp | |
parent | A new Block handling system :o (diff) | |
download | cuberite-ba70a151915bb14ddbe0527d8807508000819df6.tar cuberite-ba70a151915bb14ddbe0527d8807508000819df6.tar.gz cuberite-ba70a151915bb14ddbe0527d8807508000819df6.tar.bz2 cuberite-ba70a151915bb14ddbe0527d8807508000819df6.tar.lz cuberite-ba70a151915bb14ddbe0527d8807508000819df6.tar.xz cuberite-ba70a151915bb14ddbe0527d8807508000819df6.tar.zst cuberite-ba70a151915bb14ddbe0527d8807508000819df6.zip |
Diffstat (limited to 'source/blocks/Block.cpp')
-rw-r--r-- | source/blocks/Block.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blocks/Block.cpp b/source/blocks/Block.cpp index 047caa989..1fd7a1af8 100644 --- a/source/blocks/Block.cpp +++ b/source/blocks/Block.cpp @@ -34,10 +34,10 @@ #include "BlockCactus.h"
#include "BlockStems.h"
#include "BlockGlowstone.h"
-#include "BlockRedstoneOre.h"
#include "BlockStone.h"
#include "BlockMelon.h"
#include "BlockIce.h"
+#include "BlockOre.h"
bool cBlockHandler::m_HandlerInitialized = false;
cBlockHandler *cBlockHandler::m_BlockHandler[256];
@@ -144,9 +144,15 @@ cBlockHandler *cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockID) return new cBlockStemsHandler(a_BlockID);
case E_BLOCK_GLOWSTONE:
return new cBlockGlowstoneHandler(a_BlockID);
+ case E_BLOCK_DIAMOND_ORE:
+ case E_BLOCK_GOLD_ORE:
case E_BLOCK_REDSTONE_ORE:
case E_BLOCK_REDSTONE_ORE_GLOWING:
- return new cBlockRedstoneOreHandler(a_BlockID);
+ case E_BLOCK_EMERALD_ORE:
+ case E_BLOCK_IRON_ORE:
+ case E_BLOCK_LAPIS_ORE:
+ case E_BLOCK_COAL_ORE:
+ return new cBlockOreHandler(a_BlockID);
case E_BLOCK_STONE:
case E_BLOCK_COBBLESTONE:
return new cBlockStoneHandler(a_BlockID);
@@ -261,6 +267,11 @@ void cBlockHandler::DropBlock(cWorld *a_World, int a_X, int a_Y, int a_Z) }
}
+bool cBlockHandler::CanBePlacedAt(cWorld *a_World, int a_X, int a_Y, int a_Z, char a_Dir)
+{
+ return CanBeAt(a_World, a_X, a_Y, a_Z);
+}
+
bool cBlockHandler::CanBeAt(cWorld *a_World, int a_X, int a_Y, int a_Z)
{
return true;
|