summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemShears.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-17 17:44:34 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-17 17:44:34 +0100
commit90ab055eab62b35a8ddc681e6d79aa1d42afae9f (patch)
treeb71798809ca05c1d904a18083a8c652a4954306a /src/Items/ItemShears.h
parentMade buffers static const (diff)
parentFixed double to float conversions. (diff)
downloadcuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.gz
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.bz2
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.lz
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.xz
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.tar.zst
cuberite-90ab055eab62b35a8ddc681e6d79aa1d42afae9f.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;
}