diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-11 18:15:34 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-11 18:15:34 +0100 |
commit | d2573b84dd52c06c723953ef66da4af8937a5a53 (patch) | |
tree | 32b2fcc9ccfb727fe339f5cb675cbbb50298238c /source/World.h | |
parent | Fixed a crash in LeakFinder when out of memory (diff) | |
download | cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.gz cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.bz2 cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.lz cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.xz cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.tar.zst cuberite-d2573b84dd52c06c723953ef66da4af8937a5a53.zip |
Diffstat (limited to '')
-rw-r--r-- | source/World.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source/World.h b/source/World.h index 781dc3e8c..2e8572b00 100644 --- a/source/World.h +++ b/source/World.h @@ -54,12 +54,17 @@ typedef cItemCallback<cFurnaceEntity> cFurnaceCallback; - -class cWorld // tolua_export -{ // tolua_export +// tolua_begin +class cWorld +{ public: - // tolua_begin + enum eDimension + { + dimNether = -1, + dimOverworld = 0, + dimEnd = 1, + } ; static const char * GetClassStatic(void) { @@ -92,6 +97,8 @@ public: eGameMode GetGameMode(void) const { return m_GameMode; } bool IsPVPEnabled(void) const { return m_bEnabledPVP; } bool IsDeepSnowEnabled(void) const { return m_IsDeepSnowEnabled; } + + eDimension GetDimension(void) const { return m_Dimension; } int GetHeight(int a_BlockX, int a_BlockZ); @@ -459,7 +466,10 @@ private: friend class cRoot; - // This random generator is to be used only in the Tick() method, and thus only in the World-Tick-thread (MTRand is not exactly thread-safe) + /// The dimension of the world, used by the client to provide correct lighting scheme + eDimension m_Dimension; + + /// This random generator is to be used only in the Tick() method, and thus only in the World-Tick-thread (MTRand is not exactly thread-safe) MTRand m_TickRand; double m_SpawnX; |