diff options
Diffstat (limited to 'source/BlockEntity.h')
-rw-r--r-- | source/BlockEntity.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/BlockEntity.h b/source/BlockEntity.h index 0cc7f6077..05818437b 100644 --- a/source/BlockEntity.h +++ b/source/BlockEntity.h @@ -56,6 +56,9 @@ public: cWorld * GetWorld(void) const {return m_World; } + int GetChunkX(void) const { return FAST_FLOOR_DIV(m_PosX, cChunkDef::Width); } + int GetChunkZ(void) const { return FAST_FLOOR_DIV(m_PosZ, cChunkDef::Width); } + // tolua_end virtual void SaveToJson (Json::Value & a_Value) = 0; |