Files
MinecraftConsoles/Minecraft.World/LevelStorage.h
ModMaker101 a9be52c41a Project modernization (#630)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
2026-03-08 09:56:03 +07:00

38 lines
1016 B
C++

#pragma once
using namespace std;
#include "ConsoleSavePath.h"
class PlayerIO;
class Dimension;
class ChunkStorage;
class LevelData;
class Player;
class File;
class ConsoleSaveFile;
class LevelStorage
{
public:
static const wstring NETHER_FOLDER;
static const wstring ENDER_FOLDER;
virtual LevelData *prepareLevel() = 0;
virtual void checkSession() = 0;
virtual ChunkStorage *createChunkStorage(Dimension *dimension) = 0;
virtual void saveLevelData(LevelData *levelData, vector<shared_ptr<Player> > *players) = 0;
virtual void saveLevelData(LevelData *levelData) = 0;
virtual PlayerIO *getPlayerIO() = 0;
virtual void closeAll() = 0;
virtual ConsoleSavePath getDataFile(const wstring& id) = 0;
virtual wstring getLevelId() = 0;
public:
virtual ConsoleSaveFile *getSaveFile() { return nullptr; }
virtual void flushSaveFile(bool autosave) {}
// 4J Added
virtual int getAuxValueForMap(PlayerUID xuid, int dimension, int centreXC, int centreZC, int scale) { return 0; }
};