From 84a7e14e86b0bb4025e3c93d6a5d09ee8240a531 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 26 May 2013 15:29:43 +0000 Subject: Block entities with storage now correctly mark the chunk as dirty when their contents change. http://forum.mc-server.org/showthread.php?tid=434&pid=8210#pid8210 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1515 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockEntity.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/BlockEntity.h') 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; -- cgit v1.2.3