Protection Enchantments, some fixes
- Protection echantments (fire, blast, feather falling, protection and projectile). It isn't finished, add secondary effects and optimize the code. - Removed some brackets. - Silk touch fixed.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user