summaryrefslogtreecommitdiffstats
path: root/source/cBlockEntity.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/cBlockEntity.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/cBlockEntity.h')
-rw-r--r--source/cBlockEntity.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/cBlockEntity.h b/source/cBlockEntity.h
index 75c864cec..cbb6e7681 100644
--- a/source/cBlockEntity.h
+++ b/source/cBlockEntity.h
@@ -6,12 +6,19 @@
enum ENUM_BLOCK_ID;
#endif
+class cChunk;
class cClientHandle;
class cPlayer;
class cBlockEntity
{
protected:
- cBlockEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z) : m_PosX( a_X ), m_PosY( a_Y ), m_PosZ( a_Z ), m_BlockType( a_BlockType ) {}
+ cBlockEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
+ : m_PosX( a_X )
+ , m_PosY( a_Y )
+ , m_PosZ( a_Z )
+ , m_BlockType( a_BlockType )
+ , m_Chunk( a_Chunk )
+ {}
public:
virtual ~cBlockEntity() {};
virtual void Destroy() {};
@@ -19,6 +26,7 @@ public:
int GetPosX() { return m_PosX; }
int GetPosY() { return m_PosY; }
int GetPosZ() { return m_PosZ; }
+ cChunk* GetChunk() { return m_Chunk; }
ENUM_BLOCK_ID GetBlockType() { return m_BlockType; }
@@ -30,5 +38,7 @@ protected:
int m_PosY;
int m_PosZ;
+ cChunk* m_Chunk;
+
ENUM_BLOCK_ID m_BlockType;
};