summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/World.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-09 23:53:33 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-09 23:53:33 +0200
commita1fd50e920eba0f198b898e5df4ff5f60424d355 (patch)
tree6b2a3e0ec704d5edfec221c84ca1571376df9c1e /logic/minecraft/World.h
parent51070a13f711e53835f9aadc220c8177440590d9 (diff)
downloadMultiMC-a1fd50e920eba0f198b898e5df4ff5f60424d355.tar
MultiMC-a1fd50e920eba0f198b898e5df4ff5f60424d355.tar.gz
MultiMC-a1fd50e920eba0f198b898e5df4ff5f60424d355.tar.lz
MultiMC-a1fd50e920eba0f198b898e5df4ff5f60424d355.tar.xz
MultiMC-a1fd50e920eba0f198b898e5df4ff5f60424d355.zip
GH-1227: World import using drag and drop - zip files and folders
Diffstat (limited to 'logic/minecraft/World.h')
-rw-r--r--logic/minecraft/World.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/logic/minecraft/World.h b/logic/minecraft/World.h
index 91cb2a83..27184e05 100644
--- a/logic/minecraft/World.h
+++ b/logic/minecraft/World.h
@@ -48,15 +48,23 @@ public:
// change the world's filesystem path (used by world lists for *MAGIC* purposes)
void repath(const QFileInfo &file);
+ bool install(QString to);
+
// WEAK compare operator - used for replacing worlds
bool operator==(const World &other) const;
bool strongCompare(const World &other) const;
+private:
+ void readFromZip(const QFileInfo &file);
+ void readFromFS(const QFileInfo &file);
+ void parseLevelDat(QByteArray data);
+
protected:
- QFileInfo m_file;
+ QFileInfo m_containerFile;
QString m_folderName;
QString m_actualName;
+ QDateTime levelDatTime;
QDateTime m_lastPlayed;
int64_t m_randomSeed = 0;
bool is_valid = false;