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/FlatLevelSource.cpp | |
| parent | 175fc3824e502ecd701c1da2ecd2061d77495693 (diff) | |
Remove all MSVC `__int64` (#742)
Diffstat (limited to 'Minecraft.World/FlatLevelSource.cpp')
| -rw-r--r-- | Minecraft.World/FlatLevelSource.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Minecraft.World/FlatLevelSource.cpp b/Minecraft.World/FlatLevelSource.cpp index 7a31374e..ec2c0f96 100644 --- a/Minecraft.World/FlatLevelSource.cpp +++ b/Minecraft.World/FlatLevelSource.cpp @@ -11,7 +11,7 @@ //FlatLevelSource::villageFeature = new VillageFeature(1); -FlatLevelSource::FlatLevelSource(Level *level, __int64 seed, bool generateStructures) +FlatLevelSource::FlatLevelSource(Level *level, int64_t seed, bool generateStructures) { m_XZSize = level->getLevelData()->getXZSize(); @@ -32,26 +32,26 @@ FlatLevelSource::~FlatLevelSource() delete villageFeature; } -void FlatLevelSource::prepareHeights(byteArray blocks) +void FlatLevelSource::prepareHeights(byteArray blocks) { int height = blocks.length / (16 * 16); - for (int xc = 0; xc < 16; xc++) + for (int xc = 0; xc < 16; xc++) { - for (int zc = 0; zc < 16; zc++) + for (int zc = 0; zc < 16; zc++) { - for (int yc = 0; yc < height; yc++) + for (int yc = 0; yc < height; yc++) { int block = 0; - if (yc == 0) + if (yc == 0) { block = Tile::unbreakable_Id; - } - else if (yc <= 2) + } + else if (yc <= 2) { block = Tile::dirt_Id; - } - else if (yc == 3) + } + else if (yc == 3) { block = Tile::grass_Id; } @@ -61,12 +61,12 @@ void FlatLevelSource::prepareHeights(byteArray blocks) } } -LevelChunk *FlatLevelSource::create(int x, int z) +LevelChunk *FlatLevelSource::create(int x, int z) { return getChunk(x, z); } -LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs) +LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs) { // 4J - now allocating this with a physical alloc & bypassing general memory management so that it will get cleanly freed int chunksSize = Level::genDepth * 16 * 16; @@ -80,7 +80,7 @@ LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs) // double[] temperatures = level.getBiomeSource().temperatures; - if (generateStructures) + if (generateStructures) { villageFeature->apply(this, level, xOffs, zOffs, blocks); } @@ -96,43 +96,43 @@ LevelChunk *FlatLevelSource::getChunk(int xOffs, int zOffs) } -bool FlatLevelSource::hasChunk(int x, int y) +bool FlatLevelSource::hasChunk(int x, int y) { return true; } -void FlatLevelSource::postProcess(ChunkSource *parent, int xt, int zt) +void FlatLevelSource::postProcess(ChunkSource *parent, int xt, int zt) { // 4J - changed from random to pprandom so we can run in parallel with getChunk etc. pprandom->setSeed(level->getSeed()); - __int64 xScale = pprandom->nextLong() / 2 * 2 + 1; - __int64 zScale = pprandom->nextLong() / 2 * 2 + 1; + int64_t xScale = pprandom->nextLong() / 2 * 2 + 1; + int64_t zScale = pprandom->nextLong() / 2 * 2 + 1; pprandom->setSeed(((xt * xScale) + (zt * zScale)) ^ level->getSeed()); - if (generateStructures) + if (generateStructures) { villageFeature->postProcess(level, pprandom, xt, zt); } - + app.processSchematics(parent->getChunk(xt,zt)); } -bool FlatLevelSource::save(bool force, ProgressListener *progressListener) +bool FlatLevelSource::save(bool force, ProgressListener *progressListener) { return true; } -bool FlatLevelSource::tick() +bool FlatLevelSource::tick() { return false; } -bool FlatLevelSource::shouldSave() +bool FlatLevelSource::shouldSave() { return true; } -wstring FlatLevelSource::gatherStats() +wstring FlatLevelSource::gatherStats() { return L"FlatLevelSource"; } @@ -140,7 +140,7 @@ wstring FlatLevelSource::gatherStats() vector<Biome::MobSpawnerData *> *FlatLevelSource::getMobsAt(MobCategory *mobCategory, int x, int y, int z) { Biome *biome = level->getBiome(x, z); - if (biome == NULL) + if (biome == NULL) { return NULL; } |
