From 9b28ca657727f6f1f6eaecd372302c02807cf666 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 7 Jun 2012 06:50:54 +0000 Subject: Snow drops snowballs only when mined with a shovel git-svn-id: http://mc-server.googlecode.com/svn/trunk@564 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cBlockToPickup.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/cBlockToPickup.cpp') 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: { -- cgit v1.2.3