summaryrefslogtreecommitdiffstats
path: root/source/cBlockToPickup.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-25 18:47:01 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-25 18:47:01 +0100
commit62abd8f29bbaec6da00b277d0bf4ced54ccab921 (patch)
tree4921dcb6892e2c5be5e61aedc47a399743a1327f /source/cBlockToPickup.cpp
parentRefactored both simulators (water and lava) to make them more flexible and easier to modify (diff)
downloadcuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.tar
cuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.tar.gz
cuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.tar.bz2
cuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.tar.lz
cuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.tar.xz
cuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.tar.zst
cuberite-62abd8f29bbaec6da00b277d0bf4ced54ccab921.zip
Diffstat (limited to '')
-rw-r--r--source/cBlockToPickup.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/cBlockToPickup.cpp b/source/cBlockToPickup.cpp
index c0597d005..fb7a898ae 100644
--- a/source/cBlockToPickup.cpp
+++ b/source/cBlockToPickup.cpp
@@ -1,4 +1,5 @@
#include "cBlockToPickup.h"
+#include "Defines.h"
#include "BlockID.h"
#include "stdlib.h"
@@ -10,8 +11,11 @@ ENUM_ITEM_ID cBlockToPickup::ToPickup( unsigned char a_BlockID, ENUM_ITEM_ID a_U
{
case E_BLOCK_AIR:
return E_ITEM_EMPTY;
+ case E_BLOCK_COBBLESTONE:
case E_BLOCK_STONE:
- return E_ITEM_COBBLESTONE;
+ if(ItemCategory::IsPickaxe(a_UsedItemID))
+ return E_ITEM_COBBLESTONE;
+ return E_ITEM_EMPTY;
case E_BLOCK_GRASS:
return E_ITEM_DIRT;
case E_BLOCK_GLASS:
@@ -54,6 +58,8 @@ ENUM_ITEM_ID cBlockToPickup::ToPickup( unsigned char a_BlockID, ENUM_ITEM_ID a_U
return E_ITEM_WOODEN_DOOR;
case E_BLOCK_IRON_DOOR:
return E_ITEM_IRON_DOOR;
+ case E_BLOCK_GLOWSTONE:
+ return E_ITEM_GLOWSTONE_DUST;
default:
return (ENUM_ITEM_ID)a_BlockID;
}
@@ -66,6 +72,8 @@ char cBlockToPickup::PickupCount(unsigned char a_BlockID)
case E_BLOCK_REDSTONE_ORE_GLOWING:
case E_BLOCK_REDSTONE_ORE:
return rand() % 2 + 4;
+ case E_BLOCK_GLOWSTONE:
+ return rand() % 3 + 2;
case E_BLOCK_MELON:
return rand() % 8 + 3;
case E_BLOCK_LAPIS_ORE: