summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2017-06-20 16:42:14 +0200
committerLukas Pioch <lukas@zgow.de>2017-06-21 08:09:03 +0200
commit0e1649a0f15a23717c72d7984a0b5d44ac29a769 (patch)
tree83fc0034dd57992a6a8669fdae750443d1830e0a /src/Items
parentAnvil storage: load block entities from both old and new name-styles. (#3784) (diff)
downloadcuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.tar
cuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.tar.gz
cuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.tar.bz2
cuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.tar.lz
cuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.tar.xz
cuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.tar.zst
cuberite-0e1649a0f15a23717c72d7984a0b5d44ac29a769.zip
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemShears.h31
1 files changed, 6 insertions, 25 deletions
diff --git a/src/Items/ItemShears.h b/src/Items/ItemShears.h
index 47e58ae4b..b9866e068 100644
--- a/src/Items/ItemShears.h
+++ b/src/Items/ItemShears.h
@@ -35,15 +35,10 @@ public:
if ((Block == E_BLOCK_LEAVES) || (Block == E_BLOCK_NEW_LEAVES))
{
cItems Drops;
- cBlockHandler * Handler = cBlockInfo::GetHandler(Block);
-
- Handler->ConvertToPickups(Drops, BlockMeta);
Drops.Add(Block, 1, BlockMeta & 3);
a_World->SpawnItemPickups(Drops, a_BlockX, a_BlockY, a_BlockZ);
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
- a_World->SpawnItemPickups(Drops, a_BlockX, a_BlockY, a_BlockZ);
- a_Player->UseEquippedItem();
return true;
}
@@ -68,7 +63,7 @@ public:
virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action) override
{
- return 0;
+ return 1;
}
@@ -79,17 +74,6 @@ public:
a_World->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, Block, BlockMeta);
super::OnBlockDestroyed(a_World, a_Player, a_Item, a_BlockX, a_BlockY, a_BlockZ);
- switch (Block)
- {
- case E_BLOCK_COBWEB:
- case E_BLOCK_DEAD_BUSH:
- case E_BLOCK_TRIPWIRE:
- case E_BLOCK_VINES:
- case E_BLOCK_WOOL:
- {
- a_Player->UseEquippedItem();
- }
- }
}
@@ -100,16 +84,13 @@ public:
{
return 15.0f;
}
+ else if (IsBlocksWool(a_Block))
+ {
+ return 5.0f;
+ }
else
{
- if (IsBlocksWool(a_Block))
- {
- return 5.0f;
- }
- else
- {
- return super::GetBlockBreakingStrength(a_Block);
- }
+ return super::GetBlockBreakingStrength(a_Block);
}
}