1
0

Added more enchantments and some fixes

- Removed Debug messages
- Added Punch enchantment effect
- Added Silk Touch enchantment
- Added Unbreaking enchantment effect
This commit is contained in:
Jaume Aloy
2014-08-19 16:08:17 +02:00
parent d3fd63c9eb
commit 1897f678f9
6 changed files with 101 additions and 23 deletions

View File

@@ -30,18 +30,18 @@ public:
{
return;
}
BLOCKTYPE BlockBelow = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ);
if (!cBlockInfo::FullyOccupiesVoxel(BlockBelow) && !IsBlockLiquid(BlockBelow))
cEnchantments Enchantments = a_Player->GetInventory().GetEquippedItem().m_Enchantments;
if (Enchantments.GetLevel(cEnchantments::enchSilkTouch) == 0)
{
return;
BLOCKTYPE BlockBelow = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ);
if (!cBlockInfo::FullyOccupiesVoxel(BlockBelow) && !IsBlockLiquid(BlockBelow))
{
return;
}
a_ChunkInterface.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_WATER, 0);
// This is called later than the real destroying of this ice block
}
a_ChunkInterface.FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_WATER, 0);
// This is called later than the real destroying of this ice block
}
} ;
} ;