summaryrefslogtreecommitdiffstats
path: root/src/BlockInfo.h
diff options
context:
space:
mode:
authormohe2015 <mohe2015@users.noreply.github.com>2016-11-06 19:30:19 +0100
committerMattes D <github@xoft.cz>2016-11-06 19:30:19 +0100
commit32b38fb2649fb282b6446c4e544866c0161aa7da (patch)
tree51d2fd4d507b9f46e80d90f357a6fee78d2f5ffa /src/BlockInfo.h
parentMerge pull request #3416 from cuberite/JsonSerializerErrorReport (diff)
downloadcuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.tar
cuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.tar.gz
cuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.tar.bz2
cuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.tar.lz
cuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.tar.xz
cuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.tar.zst
cuberite-32b38fb2649fb282b6446c4e544866c0161aa7da.zip
Diffstat (limited to '')
-rw-r--r--src/BlockInfo.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h
index d42987794..adf370c13 100644
--- a/src/BlockInfo.h
+++ b/src/BlockInfo.h
@@ -70,6 +70,9 @@ public:
/** Sound when placing this block */
AString m_PlaceSound;
+ /** Block's hardness. The greater the value the longer the player needs to break the block. */
+ float m_Hardness;
+
// tolua_end
/** Associated block handler. */
@@ -89,6 +92,7 @@ public:
inline static bool CanBeTerraformed (BLOCKTYPE a_Type) { return Get(a_Type).m_CanBeTerraformed; }
inline static float GetBlockHeight (BLOCKTYPE a_Type) { return Get(a_Type).m_BlockHeight; }
inline static AString GetPlaceSound (BLOCKTYPE a_Type) { return Get(a_Type).m_PlaceSound; }
+ inline static float GetHardness (BLOCKTYPE a_Type) { return Get(a_Type).m_Hardness; }
// tolua_end
@@ -112,6 +116,7 @@ protected:
, m_CanBeTerraformed(false)
, m_BlockHeight(1.0)
, m_PlaceSound("")
+ , m_Hardness(0.0f)
, m_Handler(nullptr)
{}