diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-14 18:57:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 18:57:30 +0200 |
commit | 9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b (patch) | |
tree | 861b54c5b0fbd2dd98c5a0f6674e8abafe38b26e /src/World.h | |
parent | Introduce recipe book functionality (#4493) (diff) | |
download | cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.tar cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.tar.gz cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.tar.bz2 cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.tar.lz cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.tar.xz cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.tar.zst cuberite-9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b.zip |
Diffstat (limited to 'src/World.h')
-rw-r--r-- | src/World.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/World.h b/src/World.h index 860bed5d6..76c0fa3c9 100644 --- a/src/World.h +++ b/src/World.h @@ -91,6 +91,18 @@ public: return "cWorld"; } + /** Construct the world and read settings from its ini file. + @param a_DeadlockDetect is used for tracking this world's age, detecting a possible deadlock. + @param a_WorldNames is a list of all world names, used to validate linked worlds + */ + cWorld( + const AString & a_WorldName, const AString & a_DataPath, + cDeadlockDetect & a_DeadlockDetect, const AStringVector & a_WorldNames, + eDimension a_Dimension = dimOverworld, const AString & a_LinkedOverworldName = {} + ); + + virtual ~cWorld() override; + // tolua_begin /** Get whether saving chunks is enabled */ @@ -966,7 +978,7 @@ public: void GetChunkStats(int & a_NumValid, int & a_NumDirty, int & a_NumInLightingQueue); // Various queues length queries (cannot be const, they lock their CS): - inline int GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export + inline size_t GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export inline size_t GetLightingQueueLength (void) { return m_Lighting.GetQueueLength(); } // tolua_export inline size_t GetStorageLoadQueueLength(void) { return m_Storage.GetLoadQueueLength(); } // tolua_export inline size_t GetStorageSaveQueueLength(void) { return m_Storage.GetSaveQueueLength(); } // tolua_export @@ -1104,10 +1116,6 @@ public: private: - friend class cRoot; - - - class cTickThread: public cIsThread { @@ -1327,17 +1335,6 @@ private: /** Queue for the chunk data to be set into m_ChunkMap by the tick thread. Protected by m_CSSetChunkDataQueue */ cSetChunkDataPtrs m_SetChunkDataQueue; - /** Construct the world and read settings from its ini file. - @param a_DeadlockDetect is used for tracking this world's age, detecting a possible deadlock. - @param a_WorldNames is a list of all world names, used to validate linked worlds - */ - cWorld( - const AString & a_WorldName, const AString & a_DataPath, - cDeadlockDetect & a_DeadlockDetect, const AStringVector & a_WorldNames, - eDimension a_Dimension = dimOverworld, const AString & a_LinkedOverworldName = {} - ); - virtual ~cWorld() override; - void Tick(std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_LastTickDurationMSec); /** Handles the weather in each tick */ |