diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-09-05 16:26:30 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-09-05 16:26:30 +0200 |
commit | aa2495e3867e87ea37729b58b0df3f2ce940dbb6 (patch) | |
tree | 9f71b03f914cd7b077f6c13cd2b6ae2f691c5c66 /src/Blocks/BlockIce.h | |
parent | Moved to passing pointers instead of passing by reference. (diff) | |
parent | Merge pull request #1375 from mc-server/EntitiesInBox (diff) | |
download | cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.gz cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.bz2 cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.lz cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.xz cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.zst cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.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 387dd8e54..9aa769a5a 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 } } ; - - - - |