diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-07 03:31:30 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-07 03:31:30 +0700 |
| commit | 988e3042e00485aa7ed3725fe7bfde1da8cf8519 (patch) | |
| tree | cf712d80b4d03eec73f935e0cce23020ddb6f5ef /Minecraft.World/LevelData.cpp | |
| parent | 175fc3824e502ecd701c1da2ecd2061d77495693 (diff) | |
Remove all MSVC `__int64` (#742)
Diffstat (limited to 'Minecraft.World/LevelData.cpp')
| -rw-r--r-- | Minecraft.World/LevelData.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/Minecraft.World/LevelData.cpp b/Minecraft.World/LevelData.cpp index 91b72fe8..05bc2060 100644 --- a/Minecraft.World/LevelData.cpp +++ b/Minecraft.World/LevelData.cpp @@ -14,18 +14,18 @@ LevelData::LevelData(CompoundTag *tag) { seed = tag->getLong(L"RandomSeed"); m_pGenerator = LevelType::lvl_normal; - if (tag->contains(L"generatorName")) + if (tag->contains(L"generatorName")) { wstring generatorName = tag->getString(L"generatorName"); m_pGenerator = LevelType::getLevelType(generatorName); - if (m_pGenerator == NULL) + if (m_pGenerator == NULL) { m_pGenerator = LevelType::lvl_normal; - } - else if (m_pGenerator->hasReplacement()) + } + else if (m_pGenerator->hasReplacement()) { int generatorVersion = 0; - if (tag->contains(L"generatorVersion")) + if (tag->contains(L"generatorVersion")) { generatorVersion = tag->getInt(L"generatorVersion"); } @@ -96,7 +96,7 @@ LevelData::LevelData(CompoundTag *tag) hasBeenInCreative = tag->getBoolean(L"hasBeenInCreative"); // 4J added so we can not award achievements to levels modified in creative // 4J added - for stronghold position - bStronghold = tag->getBoolean(L"hasStronghold"); + bStronghold = tag->getBoolean(L"hasStronghold"); if(bStronghold==false) { @@ -111,7 +111,7 @@ LevelData::LevelData(CompoundTag *tag) } // 4J added - for stronghold end portal position - bStrongholdEndPortal = tag->getBoolean(L"hasStrongholdEndPortal"); + bStrongholdEndPortal = tag->getBoolean(L"hasStrongholdEndPortal"); if(bStrongholdEndPortal==false) { @@ -148,7 +148,7 @@ LevelData::LevelData(CompoundTag *tag) default: assert(0); break; } assert(newWorldSize > m_xzSize); - m_xzSize = newWorldSize; + m_xzSize = newWorldSize; m_hellScale = newHellScale; } #endif @@ -182,20 +182,20 @@ LevelData::LevelData(CompoundTag *tag) #endif /* 4J - we don't store this anymore - if (tag->contains(L"Player")) + if (tag->contains(L"Player")) { loadedPlayerTag = tag->getCompound(L"Player"); dimension = loadedPlayerTag->getInt(L"Dimension"); } else - { + { this->loadedPlayerTag = NULL; } */ dimension = 0; } -LevelData::LevelData(LevelSettings *levelSettings, const wstring& levelName) +LevelData::LevelData(LevelSettings *levelSettings, const wstring& levelName) { seed = levelSettings->getSeed(); gameType = levelSettings->getGameType(); @@ -207,7 +207,7 @@ LevelData::LevelData(LevelSettings *levelSettings, const wstring& levelName) generatorOptions = levelSettings->getLevelTypeOptions(); allowCommands = levelSettings->getAllowCommands(); - // 4J Stu - Default initers + // 4J Stu - Default initers xSpawn = 0; ySpawn = 0; zSpawn = 0; @@ -319,13 +319,13 @@ CompoundTag *LevelData::createTag() return tag; } -CompoundTag *LevelData::createTag(vector<shared_ptr<Player> > *players) +CompoundTag *LevelData::createTag(vector<shared_ptr<Player> > *players) { // 4J - removed all code for storing tags for players return createTag(); } -void LevelData::setTagData(CompoundTag *tag) +void LevelData::setTagData(CompoundTag *tag) { tag->putLong(L"RandomSeed", seed); tag->putString(L"generatorName", m_pGenerator->getGeneratorName()); @@ -373,17 +373,17 @@ void LevelData::setTagData(CompoundTag *tag) tag->putInt(L"HellScale", m_hellScale); } -__int64 LevelData::getSeed() +int64_t LevelData::getSeed() { return seed; } -int LevelData::getXSpawn() +int LevelData::getXSpawn() { return xSpawn; } -int LevelData::getYSpawn() +int LevelData::getYSpawn() { return ySpawn; } @@ -393,7 +393,7 @@ int LevelData::getZSpawn() return zSpawn; } -int LevelData::getXStronghold() +int LevelData::getXStronghold() { return xStronghold; } @@ -404,7 +404,7 @@ int LevelData::getZStronghold() return zStronghold; } -int LevelData::getXStrongholdEndPortal() +int LevelData::getXStrongholdEndPortal() { return xStrongholdEndPortal; } @@ -415,17 +415,17 @@ int LevelData::getZStrongholdEndPortal() return zStrongholdEndPortal; } -__int64 LevelData::getGameTime() +int64_t LevelData::getGameTime() { return gameTime; } -__int64 LevelData::getDayTime() +int64_t LevelData::getDayTime() { return dayTime; } -__int64 LevelData::getSizeOnDisk() +int64_t LevelData::getSizeOnDisk() { return sizeOnDisk; } @@ -441,7 +441,7 @@ CompoundTag *LevelData::getLoadedPlayerTag() // return dimension; //} -void LevelData::setSeed(__int64 seed) +void LevelData::setSeed(int64_t seed) { this->seed = seed; } @@ -451,7 +451,7 @@ void LevelData::setXSpawn(int xSpawn) this->xSpawn = xSpawn; } -void LevelData::setYSpawn(int ySpawn) +void LevelData::setYSpawn(int ySpawn) { this->ySpawn = ySpawn; } @@ -502,17 +502,17 @@ void LevelData::setZStrongholdEndPortal(int zStrongholdEndPortal) this->zStrongholdEndPortal = zStrongholdEndPortal; } -void LevelData::setGameTime(__int64 time) +void LevelData::setGameTime(int64_t time) { gameTime = time; } -void LevelData::setDayTime(__int64 time) +void LevelData::setDayTime(int64_t time) { dayTime = time; } -void LevelData::setSizeOnDisk(__int64 sizeOnDisk) +void LevelData::setSizeOnDisk(int64_t sizeOnDisk) { this->sizeOnDisk = sizeOnDisk; } @@ -524,7 +524,7 @@ void LevelData::setLoadedPlayerTag(CompoundTag *loadedPlayerTag) } // 4J Remove TU9 as it's never used -//void LevelData::setDimension(int dimension) +//void LevelData::setDimension(int dimension) //{ // this->dimension = dimension; //} @@ -536,7 +536,7 @@ void LevelData::setSpawn(int xSpawn, int ySpawn, int zSpawn) this->zSpawn = zSpawn; } -wstring LevelData::getLevelName() +wstring LevelData::getLevelName() { return levelName; } @@ -546,7 +546,7 @@ void LevelData::setLevelName(const wstring& levelName) this->levelName = levelName; } -int LevelData::getVersion() +int LevelData::getVersion() { return version; } @@ -556,7 +556,7 @@ void LevelData::setVersion(int version) this->version = version; } -__int64 LevelData::getLastPlayed() +int64_t LevelData::getLastPlayed() { return lastPlayed; } @@ -581,7 +581,7 @@ void LevelData::setThunderTime(int thunderTime) this->thunderTime = thunderTime; } -bool LevelData::isRaining() +bool LevelData::isRaining() { return raining; } @@ -621,8 +621,8 @@ void LevelData::setGameType(GameType *gameType) this->gameType = gameType; // 4J Added - hasBeenInCreative = hasBeenInCreative || - (gameType == GameType::CREATIVE) || + hasBeenInCreative = hasBeenInCreative || + (gameType == GameType::CREATIVE) || (app.GetGameHostOption(eGameHostOption_CheatsEnabled) > 0); } @@ -641,12 +641,12 @@ void LevelData::setHasBeenInCreative(bool value) hasBeenInCreative = value; } -LevelType *LevelData::getGenerator() +LevelType *LevelData::getGenerator() { return m_pGenerator; } -void LevelData::setGenerator(LevelType *generator) +void LevelData::setGenerator(LevelType *generator) { m_pGenerator = generator; } |
