summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemShears.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-22 15:48:16 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-22 15:48:16 +0100
commit2266c2150daad68c19d320683f6bf5abd7f2ebb2 (patch)
tree111fe0c36643afd27317b8d9a4c7912b6899ec4a /src/Items/ItemShears.h
parentPatched tolua to understand size_t (diff)
parentImplemented faster upscaling using templates. (diff)
downloadcuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar
cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.gz
cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.bz2
cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.lz
cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.xz
cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.tar.zst
cuberite-2266c2150daad68c19d320683f6bf5abd7f2ebb2.zip
Diffstat (limited to 'src/Items/ItemShears.h')
-rw-r--r--src/Items/ItemShears.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Items/ItemShears.h b/src/Items/ItemShears.h
index b8f75f5ba..39d2776fa 100644
--- a/src/Items/ItemShears.h
+++ b/src/Items/ItemShears.h
@@ -28,10 +28,10 @@ public:
virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override
{
BLOCKTYPE Block = a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ);
- if (Block == E_BLOCK_LEAVES)
+ if ((Block == E_BLOCK_LEAVES) || (Block == E_BLOCK_NEW_LEAVES))
{
cItems Drops;
- Drops.push_back(cItem(E_BLOCK_LEAVES, 1, a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x03));
+ Drops.push_back(cItem(Block, 1, a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x03));
a_World->SpawnItemPickups(Drops, a_BlockX, a_BlockY, a_BlockZ);
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
@@ -49,6 +49,7 @@ public:
case E_BLOCK_COBWEB:
case E_BLOCK_VINES:
case E_BLOCK_LEAVES:
+ case E_BLOCK_NEW_LEAVES:
{
return true;
}