summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockHandler.cpp
diff options
context:
space:
mode:
authorJaume Aloy <hircine45@gmail.com>2014-08-21 12:08:38 +0200
committerJaume Aloy <hircine45@gmail.com>2014-08-21 12:08:38 +0200
commit19d1c976e7cd7f6c8a4cb3540d5512a035a4162a (patch)
treee014b26ee9a2bfd15d31552338e9225777a48b81 /src/Blocks/BlockHandler.cpp
parentChanged if in BlockHandler (diff)
downloadcuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar
cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.gz
cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.bz2
cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.lz
cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.xz
cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.tar.zst
cuberite-19d1c976e7cd7f6c8a4cb3540d5512a035a4162a.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockHandler.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index 2238a68a0..0155aa97b 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -428,8 +428,14 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac
{
if (!a_DropVerbatim)
{
+ ConvertToPickups(Pickups, Meta);
+ }
+ else
+ {
+ // TODO: Add a proper overridable function for this
+ // Pickups.Add(m_BlockType, 1, Meta);
cEnchantments Enchantments = a_Digger->GetEquippedWeapon().m_Enchantments;
- if ((Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0) && (a_Digger->IsPlayer()))
+ if ((Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0) && a_Digger->IsPlayer())
{
switch (m_BlockType)
{
@@ -459,14 +465,9 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac
}
else
{
- ConvertToPickups(Pickups, Meta);
+ Pickups.Add(m_BlockType, 1, Meta);
}
}
- else
- {
- // TODO: Add a proper overridable function for this
- Pickups.Add(m_BlockType, 1, Meta);
- }
}
// Allow plugins to modify the pickups: