summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemShovel.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-10-16 10:06:34 +0200
committerGitHub <noreply@github.com>2019-10-16 10:06:34 +0200
commit221cc4ec5cb6301743e947eaabed3fecedba796f (patch)
tree4e44c8bb7523e5d1d04468fc906ae24674c10abc /src/Items/ItemShovel.h
parentFixed crash in hopper while pulling items from blockentity above itself (#4412) (diff)
downloadcuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.gz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.bz2
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.lz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.xz
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.tar.zst
cuberite-221cc4ec5cb6301743e947eaabed3fecedba796f.zip
Diffstat (limited to 'src/Items/ItemShovel.h')
-rw-r--r--src/Items/ItemShovel.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/Items/ItemShovel.h b/src/Items/ItemShovel.h
index 49ecf3348..0715f8d99 100644
--- a/src/Items/ItemShovel.h
+++ b/src/Items/ItemShovel.h
@@ -36,21 +36,7 @@ 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_SNOW)
- {
- cChunkInterface ChunkInterface(a_World->GetChunkMap());
- cBlockInServerPluginInterface PluginInterface(*a_World);
- BlockHandler(Block)->DropBlock(ChunkInterface, *a_World, PluginInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ);
- a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0);
- a_Player->UseEquippedItem(cItemHandler::dlaBreakBlock);
- return true;
- }
- return false;
- }
virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override
{
@@ -61,6 +47,10 @@ public:
return super::CanHarvestBlock(a_BlockType);
}
+
+
+
+
virtual bool CanRepairWithRawMaterial(short a_ItemType) override
{
switch (m_ItemType)
@@ -74,6 +64,10 @@ public:
return false;
}
+
+
+
+
virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) override
{
switch (a_Block)
@@ -101,9 +95,7 @@ public:
}
break;
}
- default: return super::GetBlockBreakingStrength(a_Block);
}
- ASSERT(!"Something is wrong here... Maybe they are shovels out of a new material?");
- return 1.0f;
+ return super::GetBlockBreakingStrength(a_Block);
}
};