diff options
author | KingCol13 <48412633+KingCol13@users.noreply.github.com> | 2020-10-02 22:57:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 22:57:17 +0200 |
commit | cd1b50774512e09736b78df025163ab9b26bd528 (patch) | |
tree | 082bbf03758f8fe6e32711fbbf2104efdcb13994 /src/BlockInfo.h | |
parent | Update issue templates (#4960) (diff) | |
download | cuberite-cd1b50774512e09736b78df025163ab9b26bd528.tar cuberite-cd1b50774512e09736b78df025163ab9b26bd528.tar.gz cuberite-cd1b50774512e09736b78df025163ab9b26bd528.tar.bz2 cuberite-cd1b50774512e09736b78df025163ab9b26bd528.tar.lz cuberite-cd1b50774512e09736b78df025163ab9b26bd528.tar.xz cuberite-cd1b50774512e09736b78df025163ab9b26bd528.tar.zst cuberite-cd1b50774512e09736b78df025163ab9b26bd528.zip |
Diffstat (limited to '')
-rw-r--r-- | src/BlockInfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/BlockInfo.h b/src/BlockInfo.h index f35df90ae..8962f6328 100644 --- a/src/BlockInfo.h +++ b/src/BlockInfo.h @@ -25,6 +25,9 @@ public: inline static NIBBLETYPE GetLightValue (BLOCKTYPE a_Type) { return Get(a_Type).m_LightValue; } inline static NIBBLETYPE GetSpreadLightFalloff(BLOCKTYPE a_Type) { return Get(a_Type).m_SpreadLightFalloff; } inline static bool IsTransparent (BLOCKTYPE a_Type) { return Get(a_Type).m_Transparent; } + /** Warning: IsOneHitDig does not take into account enchantments / status effects / swim state / floating state + and therefore may be incorrect. Only use to check if hardness is 0 + If you want to check if a player would instantly mine a_Block use cPlayer::CanInstantlyMine(a_Block) */ inline static bool IsOneHitDig (BLOCKTYPE a_Type) { return Get(a_Type).m_OneHitDig; } inline static bool IsPistonBreakable (BLOCKTYPE a_Type) { return Get(a_Type).m_PistonBreakable; } inline static bool IsRainBlocker (BLOCKTYPE a_Type) { return Get(a_Type).m_IsRainBlocker; } |