diff options
| author | void_17 <heroerror3@gmail.com> | 2026-03-02 17:39:35 +0700 |
|---|---|---|
| committer | void_17 <heroerror3@gmail.com> | 2026-03-02 17:39:35 +0700 |
| commit | b9a2951901dac21b08589c9d8b4a7eae78757726 (patch) | |
| tree | 6b750cbdde9d2bd2aeaec9880ac7db62e9356745 /Minecraft.World/FlatLevelSource.cpp | |
| parent | 119bff351450ea16ffda550b6e0f67379b29f708 (diff) | |
Revert "Get rid of MSVC's __int64"
This reverts commit d63f79325f85e014361eb8cf1e41eaebedb1ae71.
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 96b53312..6435bfb4 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_t seed, bool generateStructures) +FlatLevelSource::FlatLevelSource(Level *level, __int64 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_t xScale = pprandom->nextLong() / 2 * 2 + 1; - int64_t zScale = pprandom->nextLong() / 2 * 2 + 1; + __int64 xScale = pprandom->nextLong() / 2 * 2 + 1; + __int64 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; } |
