summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockIce.h
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-09-01 21:30:45 +0200
committerMasy98 <masy@antheruscraft.de>2014-09-01 21:30:45 +0200
commitcc9acd13b90c2dff21b6a7b7d4db57780aba0fc7 (patch)
treede161c8abb3a9fb961b794e4d4cf255102b83715 /src/Blocks/BlockIce.h
parentFixed spacing and light gray wool name! (diff)
parentMerge pull request #1368 from mc-server/coverityFixes (diff)
downloadcuberite-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 'src/Blocks/BlockIce.h')
-rw-r--r--src/Blocks/BlockIce.h22
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
}
} ;
-
-
-
-