1
0
- Changed m_TicksLeftBurning > 0 for IsOnFire()
- Tried to do the changes in BlockHandler.cpp
- Removed m_Creator in ArrowEntity
- Added m_Enchantments in ProjectileEntity CreatorData
- Added blank lines between functions
This commit is contained in:
Jaume Aloy
2014-08-19 17:57:32 +02:00
parent 07350de514
commit 596203e692
6 changed files with 51 additions and 50 deletions

View File

@@ -427,49 +427,49 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac
// Thanks to daniel0916
cPlayer * Player = (cPlayer *)a_Digger;
cEnchantments Enchantments = Player->GetInventory().GetEquippedItem().m_Enchantments;
if (Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0)
if (a_CanDrop)
{
BLOCKTYPE Type = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ);
switch (Type)
if (!a_DropVerbatim)
{
case E_BLOCK_CAKE:
case E_BLOCK_CARROTS:
case E_BLOCK_COCOA_POD:
case E_BLOCK_DOUBLE_STONE_SLAB:
case E_BLOCK_DOUBLE_WOODEN_SLAB:
case E_BLOCK_FIRE:
case E_BLOCK_FARMLAND:
case E_BLOCK_MELON_STEM:
case E_BLOCK_MOB_SPAWNER:
case E_BLOCK_NETHER_WART:
case E_BLOCK_POTATOES:
case E_BLOCK_PUMPKIN_STEM:
case E_BLOCK_SNOW:
case E_BLOCK_SUGARCANE:
case E_BLOCK_TALL_GRASS:
case E_BLOCK_CROPS:
if (Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0)
{
// Silktouch can't be used for this blocks
ConvertToPickups(Pickups, Meta);
};
default: Pickups.Add(m_BlockType, 1, Meta);
}
}
else
{
if (a_CanDrop)
{
if (!a_DropVerbatim)
{
ConvertToPickups(Pickups, Meta);
switch (m_BlockType)
{
case E_BLOCK_CAKE:
case E_BLOCK_CARROTS:
case E_BLOCK_COCOA_POD:
case E_BLOCK_DOUBLE_STONE_SLAB:
case E_BLOCK_DOUBLE_WOODEN_SLAB:
case E_BLOCK_FIRE:
case E_BLOCK_FARMLAND:
case E_BLOCK_MELON_STEM:
case E_BLOCK_MOB_SPAWNER:
case E_BLOCK_NETHER_WART:
case E_BLOCK_POTATOES:
case E_BLOCK_PUMPKIN_STEM:
case E_BLOCK_SNOW:
case E_BLOCK_SUGARCANE:
case E_BLOCK_TALL_GRASS:
case E_BLOCK_CROPS:
{
// Silktouch can't be used for this blocks
ConvertToPickups(Pickups, Meta);
break;
};
default: Pickups.Add(m_BlockType, 1, Meta);
}
}
else
{
// TODO: Add a proper overridable function for this
Pickups.Add(m_BlockType, 1, Meta);
ConvertToPickups(Pickups, Meta);
}
}
else
{
// TODO: Add a proper overridable function for this
Pickups.Add(m_BlockType, 1, Meta);
}
}
// Allow plugins to modify the pickups: