diff options
author | Masy98 <masy@antheruscraft.de> | 2014-09-01 21:30:45 +0200 |
---|---|---|
committer | Masy98 <masy@antheruscraft.de> | 2014-09-01 21:30:45 +0200 |
commit | cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7 (patch) | |
tree | de161c8abb3a9fb961b794e4d4cf255102b83715 /src/Blocks/BlockIce.h | |
parent | Fixed spacing and light gray wool name! (diff) | |
parent | Merge pull request #1368 from mc-server/coverityFixes (diff) | |
download | cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.tar cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.tar.gz cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.tar.bz2 cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.tar.lz cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.tar.xz cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.tar.zst cuberite-cc9acd13b90c2dff21b6a7b7d4db57780aba0fc7.zip |
Diffstat (limited to '')
-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 } } ; - - - - |