summaryrefslogtreecommitdiffstats
path: root/source/cChunk.h
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
commite2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f (patch)
tree2519b9736038f7d5374719122b4ba7937d2e309c /source/cChunk.h
parentput the timer and quicksort functions into their own files. Made a few changes to the converter. Converter doesn't understand Entity tags and some chunks cause it to segfault for a currently unknown reason. (diff)
downloadcuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.gz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.bz2
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.lz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.xz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.zst
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.zip
Diffstat (limited to 'source/cChunk.h')
-rw-r--r--source/cChunk.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/cChunk.h b/source/cChunk.h
index d90e817cf..c8db5f69c 100644
--- a/source/cChunk.h
+++ b/source/cChunk.h
@@ -7,6 +7,7 @@ namespace Json
class Value;
};
+class cWorld;
class cCriticalSection;
class cFurnaceEntity;
class cPacket;
@@ -17,16 +18,17 @@ class cServer;
class cChunk
{
public:
- cChunk(int a_X, int a_Y, int a_Z);
+ cChunk(int a_X, int a_Y, int a_Z, cWorld* a_World);
~cChunk();
void Initialize();
void Tick(float a_Dt);
- inline int GetPosX() { return m_PosX; }
- inline int GetPosY() { return m_PosY; }
- inline int GetPosZ() { return m_PosZ; }
+ int GetPosX() { return m_PosX; }
+ int GetPosY() { return m_PosY; }
+ int GetPosZ() { return m_PosZ; }
+ cWorld* GetWorld() { return m_World; }
void Send( cClientHandle* a_Client );
void AsyncUnload( cClientHandle* a_Client );
@@ -112,6 +114,7 @@ private:
bool m_bCalculateHeightmap;
int m_PosX, m_PosY, m_PosZ;
+ cWorld* m_World;
char m_BlockData[c_BlockDataSize]; // Chunk data ready to be compressed and sent
char *m_BlockType; // Pointers to an element in m_BlockData