diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/ExtremeHillsBiome.cpp | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/ExtremeHillsBiome.cpp')
| -rw-r--r-- | Minecraft.World/ExtremeHillsBiome.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Minecraft.World/ExtremeHillsBiome.cpp b/Minecraft.World/ExtremeHillsBiome.cpp new file mode 100644 index 00000000..7e62c7d3 --- /dev/null +++ b/Minecraft.World/ExtremeHillsBiome.cpp @@ -0,0 +1,30 @@ +#include "stdafx.h" +#include "net.minecraft.world.level.h" +#include "net.minecraft.world.level.tile.h" +#include "ExtremeHillsBiome.h" + +ExtremeHillsBiome::ExtremeHillsBiome(int id) : Biome(id) +{ + friendlies.clear(); +} + +void ExtremeHillsBiome::decorate(Level *level, Random *random, int xo, int zo) { + Biome::decorate(level, random, xo, zo); + + if (GENERATE_EMERALD_ORE) + { + int emeraldCount = 3 + random->nextInt(6); + for (int d = 0; d < emeraldCount; d++) + { + int x = xo + random->nextInt(16); + int y = random->nextInt((Level::genDepth / 4) - 4) + 4; + int z = zo + random->nextInt(16); + int tile = level->getTile(x, y, z); + if (tile == Tile::rock_Id) + { + level->setTileNoUpdate(x, y, z, Tile::emeraldOre_Id); + } + } + } + +} |
