summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockIce.h
diff options
context:
space:
mode:
authorJaume Aloy <hircine45@gmail.com>2014-08-19 16:08:17 +0200
committerJaume Aloy <hircine45@gmail.com>2014-08-19 16:08:17 +0200
commit1897f678f93bb038fdc4caf1fb2995a28ef8f92e (patch)
tree08feb248f0a51b067fd61192ca10d3272dcd4d90 /src/Blocks/BlockIce.h
parentAdded some Enchantments (diff)
downloadcuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.tar
cuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.tar.gz
cuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.tar.bz2
cuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.tar.lz
cuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.tar.xz
cuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.tar.zst
cuberite-1897f678f93bb038fdc4caf1fb2995a28ef8f92e.zip
Diffstat (limited to 'src/Blocks/BlockIce.h')
-rw-r--r--src/Blocks/BlockIce.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Blocks/BlockIce.h b/src/Blocks/BlockIce.h
index c38630fe3..cfe1d179f 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
}
-} ;
-
-
-
-
+} ; \ No newline at end of file