summaryrefslogtreecommitdiffstats
path: root/source/cWorld.h
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-15 22:36:34 +0200
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-15 22:36:34 +0200
commit14dce238450b419a5df2aa171ee91981910463b0 (patch)
treeaca42ecae2e62c44847db375a2f7ae6823ed3e9e /source/cWorld.h
parentcThread uses AString instead of char * for name (fixed a warning) (diff)
downloadcuberite-14dce238450b419a5df2aa171ee91981910463b0.tar
cuberite-14dce238450b419a5df2aa171ee91981910463b0.tar.gz
cuberite-14dce238450b419a5df2aa171ee91981910463b0.tar.bz2
cuberite-14dce238450b419a5df2aa171ee91981910463b0.tar.lz
cuberite-14dce238450b419a5df2aa171ee91981910463b0.tar.xz
cuberite-14dce238450b419a5df2aa171ee91981910463b0.tar.zst
cuberite-14dce238450b419a5df2aa171ee91981910463b0.zip
Diffstat (limited to '')
-rw-r--r--source/cWorld.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/source/cWorld.h b/source/cWorld.h
index 0a4d0280e..e0e87b708 100644
--- a/source/cWorld.h
+++ b/source/cWorld.h
@@ -54,6 +54,7 @@ typedef cItemCallback<cFurnaceEntity> cFurnaceCallback;
+
class cWorld //tolua_export
{ //tolua_export
public:
@@ -330,6 +331,17 @@ public:
/// Stops threads that belong to this world (part of deinit)
void StopThreads(void);
+ void TickQueuedBlocks(float a_Dt);
+
+ struct BlockTickQueueItem
+ {
+ int X;
+ int Y;
+ int Z;
+ float ToWait;
+ };
+
+ void QueueBlockForTick(int a_X, int a_Y, int a_Z, float a_Time);
void CastThunderbolt (int a_X, int a_Y, int a_Z); //tolua_export
void SetWeather ( eWeather a_Weather ); //tolua_export
@@ -339,14 +351,14 @@ public:
cChunkGenerator & GetGenerator(void) { return m_Generator; }
cWorldStorage & GetStorage (void) { return m_Storage; }
cChunkMap * GetChunkMap (void) { return m_ChunkMap; }
-
- bool IsPlacingItemLegal(Int16 a_ItemType, int a_BlockX, int a_BlockY, int a_BlockZ);
-
+
/// Sets the blockticking to start at the specified block. Only one blocktick per chunk may be set, second call overwrites the first call
void SetNextBlockTick(int a_BlockX, int a_BlockY, int a_BlockZ); // tolua_export
int GetMaxSugarcaneHeight(void) const { return m_MaxSugarcaneHeight; } // tolua_export
int GetMaxCactusHeight (void) const { return m_MaxCactusHeight; } // tolua_export
+
+ bool IsBlockDirectlyWatered(int a_X, int a_Y, int a_Z);
private:
@@ -370,6 +382,9 @@ private:
// The cRedstone class simulates redstone and needs access to m_RSList
friend class cRedstone;
std::vector<int> m_RSList;
+
+ std::vector<BlockTickQueueItem *> m_BlockTickQueue;
+ std::vector<BlockTickQueueItem *> m_BlockTickQueueCopy; //Second is for safely removing the objects from the queue
cSimulatorManager * m_SimulatorManager;
cSandSimulator * m_SandSimulator;