summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorJaume Aloy <hircine45@gmail.com>2014-08-19 18:40:42 +0200
committerJaume Aloy <hircine45@gmail.com>2014-08-19 18:40:42 +0200
commit5008eb8c8348ad2664158a8a815ef6851d874367 (patch)
treefa0cff8a0eecfae5e1b86f720b92dc44d673a194 /src/Blocks
parentFixes (diff)
downloadcuberite-5008eb8c8348ad2664158a8a815ef6851d874367.tar
cuberite-5008eb8c8348ad2664158a8a815ef6851d874367.tar.gz
cuberite-5008eb8c8348ad2664158a8a815ef6851d874367.tar.bz2
cuberite-5008eb8c8348ad2664158a8a815ef6851d874367.tar.lz
cuberite-5008eb8c8348ad2664158a8a815ef6851d874367.tar.xz
cuberite-5008eb8c8348ad2664158a8a815ef6851d874367.tar.zst
cuberite-5008eb8c8348ad2664158a8a815ef6851d874367.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockHandler.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index d6be99f83..2238a68a0 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -424,15 +424,12 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac
cItems Pickups;
NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
- // Thanks to daniel0916
- cPlayer * Player = (cPlayer *)a_Digger;
- cEnchantments Enchantments = Player->GetInventory().GetEquippedItem().m_Enchantments;
-
if (a_CanDrop)
{
if (!a_DropVerbatim)
{
- if (Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0)
+ cEnchantments Enchantments = a_Digger->GetEquippedWeapon().m_Enchantments;
+ if ((Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0) && (a_Digger->IsPlayer()))
{
switch (m_BlockType)
{