summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-01 22:40:50 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-01 22:40:50 +0100
commite26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3 (patch)
tree585d1f17bd9c63e16feae57ca7eef31d322d14cf /src/Defines.h
parentSplit cCoord template into one and two data types (diff)
downloadcuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.tar
cuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.tar.gz
cuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.tar.bz2
cuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.tar.lz
cuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.tar.xz
cuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.tar.zst
cuberite-e26dc5cc0aaeb81ee7c6419ea91f8eef7d072ef3.zip
Diffstat (limited to '')
-rw-r--r--src/Defines.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 3a26f4be6..b3dbcc93e 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -254,9 +254,16 @@ inline bool IsValidItem(int a_ItemType)
-inline bool IsBlockWater(BLOCKTYPE a_BlockType)
+inline bool IsBlockWater(BLOCKTYPE a_BlockType, bool a_IncludeFrozenWater = false)
{
- return ((a_BlockType == E_BLOCK_WATER) || (a_BlockType == E_BLOCK_STATIONARY_WATER));
+ if (a_IncludeFrozenWater)
+ {
+ return ((a_BlockType == E_BLOCK_WATER) || (a_BlockType == E_BLOCK_STATIONARY_WATER) || (a_BlockType == E_BLOCK_ICE));
+ }
+ else
+ {
+ return ((a_BlockType == E_BLOCK_WATER) || (a_BlockType == E_BLOCK_STATIONARY_WATER));
+ }
}