diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-03 20:41:19 +0200 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-03 20:41:19 +0200 |
commit | 386d58b5862d8b76925c6523721594887606e82a (patch) | |
tree | ef073e7a843f4b75a4008d4b7383f7cdf08ceee5 /source/cBlockToPickup.cpp | |
parent | Visual Studio 2010 solution and project files (diff) | |
download | cuberite-386d58b5862d8b76925c6523721594887606e82a.tar cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.gz cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.bz2 cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.lz cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.xz cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.zst cuberite-386d58b5862d8b76925c6523721594887606e82a.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cBlockToPickup.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/cBlockToPickup.cpp b/source/cBlockToPickup.cpp new file mode 100644 index 000000000..3638740a3 --- /dev/null +++ b/source/cBlockToPickup.cpp @@ -0,0 +1,37 @@ +#include "cBlockToPickup.h"
+#include "BlockID.h"
+
+ENUM_ITEM_ID cBlockToPickup::ToPickup( unsigned char a_BlockID, ENUM_ITEM_ID a_UsedItemID )
+{
+ (void)a_UsedItemID;
+
+ switch( a_BlockID )
+ {
+ case E_BLOCK_AIR:
+ return E_ITEM_EMPTY;
+ case E_BLOCK_STONE:
+ return E_ITEM_COBBLESTONE;
+ case E_BLOCK_GRASS:
+ return E_ITEM_DIRT;
+ case E_BLOCK_DIRT:
+ return E_ITEM_DIRT;
+ case E_BLOCK_LOG:
+ return E_ITEM_LOG;
+ case E_BLOCK_COAL_ORE:
+ return E_ITEM_COAL;
+ case E_BLOCK_DIAMOND_ORE:
+ return E_ITEM_DIAMOND;
+ case E_BLOCK_IRON_BLOCK:
+ return E_ITEM_IRON_BLOCK;
+ case E_BLOCK_DIAMOND_BLOCK:
+ return E_ITEM_DIAMOND_BLOCK;
+ case E_BLOCK_GOLD_BLOCK:
+ return E_ITEM_GOLD_BLOCK;
+ case E_BLOCK_SIGN_POST:
+ case E_BLOCK_WALLSIGN:
+ return E_ITEM_SIGN;
+ default:
+ return (ENUM_ITEM_ID)a_BlockID;
+ }
+ return E_ITEM_EMPTY;
+}
|