diff options
author | madmaxoft <github@xoft.cz> | 2014-09-01 14:03:39 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-01 14:03:39 +0200 |
commit | 9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed (patch) | |
tree | c232526f4bc7b6d5bd2d67356ada8b18378fcc00 /src/Blocks/BlockIce.h | |
parent | Avoid false positive in style check. (diff) | |
parent | Fixed style (diff) | |
download | cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.tar cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.tar.gz cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.tar.bz2 cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.tar.lz cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.tar.xz cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.tar.zst cuberite-9a4e8bf83fef9614bfe9efdc341c2ed2c7e108ed.zip |
Diffstat (limited to 'src/Blocks/BlockIce.h')
-rw-r--r-- | src/Blocks/BlockIce.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Blocks/BlockIce.h b/src/Blocks/BlockIce.h index c38630fe3..47a84e5a7 100644 --- a/src/Blocks/BlockIce.h +++ b/src/Blocks/BlockIce.h @@ -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 } } ; - - - - |