summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Blocks/BlockVine.h8
-rw-r--r--src/Items/ItemShears.h31
2 files changed, 13 insertions, 26 deletions
diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h
index dc04bee60..755161b12 100644
--- a/src/Blocks/BlockVine.h
+++ b/src/Blocks/BlockVine.h
@@ -73,9 +73,15 @@ public:
{
switch (a_BlockType)
{
+ case E_BLOCK_CHEST:
+ case E_BLOCK_ENDER_CHEST:
case E_BLOCK_GLASS:
+ case E_BLOCK_PISTON:
+ case E_BLOCK_PISTON_EXTENSION:
+ case E_BLOCK_REDSTONE_REPEATER_OFF:
+ case E_BLOCK_REDSTONE_REPEATER_ON:
case E_BLOCK_STAINED_GLASS:
- case E_BLOCK_CHEST:
+ case E_BLOCK_STICKY_PISTON:
case E_BLOCK_TRAPPED_CHEST:
{
// You can't attach a vine to this solid blocks.
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);
}
}