This commit is contained in:
2026-07-20 14:49:38 +02:00
parent f7ad5acd33
commit 6f1ca8fc3b
7 changed files with 104 additions and 9 deletions

View File

@@ -15,6 +15,7 @@
#include "platform/time.h"
#include "SharedConstants.h"
#include "world/level/LevelConstants.h"
#include <sol/sol.hpp>
#define MAIN_CLASS NinecraftApp
static App* g_app = 0;
@@ -64,7 +65,6 @@ std::string findStringInConfig(std::string line, std::string config) {
return valueStr;
}
int main(int numArguments, char* pszArgs[]) {
std::ifstream serverProperties("server.properties");
@@ -148,7 +148,7 @@ int main(int numArguments, char* pszArgs[]) {
}
printf("Level Name: %s\n", levelName.c_str());
AppContext appContext;
appContext.platform = new AppPlatform();
App* app = new MAIN_CLASS();
@@ -201,6 +201,15 @@ int main(int numArguments, char* pszArgs[]) {
}
}
std::string pluginsFolder = "plugins/";
struct stat sb;
if (stat(pluginsFolder.c_str(), &sb) == 0) {
} else {
}
std::cout << "Level has been generated in " << getTimeS() - startTime << std::endl;
((MAIN_CLASS*)g_app)->level->saveLevelData();
std::cout << "Level has been saved!" << std::endl;