summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/World.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-12-11 23:53:14 +0100
committerPetr Mrázek <peterix@gmail.com>2018-12-11 23:53:14 +0100
commit13b293dd6518f8e3c80afd6fe40629e3caee69dc (patch)
tree1af24d9e9e0ea426138f18d24c7bfbeab7803d9b /api/logic/minecraft/World.h
parentde568b32b85b24fb24fdec2bc90066bf00b2f013 (diff)
downloadMultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.gz
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.lz
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.xz
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.zip
GH-2374 fix missing alternating backgrounds in worlds, add gametype column
Diffstat (limited to 'api/logic/minecraft/World.h')
-rw-r--r--api/logic/minecraft/World.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/api/logic/minecraft/World.h b/api/logic/minecraft/World.h
index 2cce85a2..7cb694a7 100644
--- a/api/logic/minecraft/World.h
+++ b/api/logic/minecraft/World.h
@@ -19,6 +19,15 @@
#include "multimc_logic_export.h"
+enum class GameType
+{
+ Survival,
+ Creative,
+ Adventure,
+ Spectator
+};
+QString MULTIMC_LOGIC_EXPORT gameTypeToString(GameType type);
+
class MULTIMC_LOGIC_EXPORT World
{
public:
@@ -35,6 +44,10 @@ public:
{
return m_lastPlayed;
}
+ GameType gameType() const
+ {
+ return m_gameType;
+ }
int64_t seed() const
{
return m_randomSeed;
@@ -79,5 +92,6 @@ protected:
QDateTime levelDatTime;
QDateTime m_lastPlayed;
int64_t m_randomSeed = 0;
+ GameType m_gameType = GameType::Survival;
bool is_valid = false;
};