summaryrefslogtreecommitdiffstats
path: root/source/cBlockToPickup.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-07 08:50:54 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-07 08:50:54 +0200
commit9b28ca657727f6f1f6eaecd372302c02807cf666 (patch)
tree1ae1ea96a2b0e8acab46a36d21225f0478d03339 /source/cBlockToPickup.cpp
parentGrass spreads to adjacent dirt blocks. Doesn't check dest light yet. (diff)
downloadcuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.tar
cuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.tar.gz
cuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.tar.bz2
cuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.tar.lz
cuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.tar.xz
cuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.tar.zst
cuberite-9b28ca657727f6f1f6eaecd372302c02807cf666.zip
Diffstat (limited to '')
-rw-r--r--source/cBlockToPickup.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/cBlockToPickup.cpp b/source/cBlockToPickup.cpp
index c9c8cbb67..14a349bb2 100644
--- a/source/cBlockToPickup.cpp
+++ b/source/cBlockToPickup.cpp
@@ -290,6 +290,17 @@ void cBlockToPickup::ToPickup(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, ENU
}
+ // Snow drops only when using a shovel
+ case E_BLOCK_SNOW_BLOCK:
+ {
+ if (ItemCategory::IsShovel(a_UsedItemID))
+ {
+ a_Drops.push_back(cItem(E_ITEM_SNOWBALL, 4, 0)); return;
+ }
+ return;
+ }
+
+
// Random multi-drop blocks:
case E_BLOCK_TALL_GRASS: a_Drops.push_back(cItem(E_ITEM_SEEDS, (short)r1.randInt(3) / 2, 1)); return;
case E_BLOCK_MELON: a_Drops.push_back(cItem(E_ITEM_MELON_SLICE, 3 + (short)r1.randInt(2), 1)); return;
@@ -298,7 +309,6 @@ void cBlockToPickup::ToPickup(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, ENU
// Fixed multi-drop blocks:
case E_BLOCK_DOUBLE_STONE_SLAB: a_Drops.push_back(cItem(E_ITEM_STONE_SLAB, 2, 0)); return;
case E_BLOCK_DOUBLE_WOODEN_SLAB: a_Drops.push_back(cItem(E_ITEM_STEP, 2, 0)); return;
- case E_BLOCK_SNOW_BLOCK: a_Drops.push_back(cItem(E_ITEM_SNOWBALL, 4, 0)); return;
default:
{