the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "net.minecraft.world.level.h"
3#include "net.minecraft.world.level.tile.h"
4#include "net.minecraft.world.level.levelgen.feature.h"
5#include "ExtremeHillsBiome.h"
6
7ExtremeHillsBiome::ExtremeHillsBiome(int id) : Biome(id)
8{
9 silverfishFeature = new OreFeature(Tile::monsterStoneEgg_Id, 8);
10 friendlies.clear();
11}
12
13ExtremeHillsBiome::~ExtremeHillsBiome()
14{
15 delete silverfishFeature;
16}
17
18void ExtremeHillsBiome::decorate(Level *level, Random *random, int xo, int zo) {
19 Biome::decorate(level, random, xo, zo);
20
21 if (GENERATE_EMERALD_ORE)
22 {
23 int emeraldCount = 3 + random->nextInt(6);
24 for (int d = 0; d < emeraldCount; d++)
25 {
26 int x = xo + random->nextInt(16);
27 int y = random->nextInt((Level::genDepth / 4) - 4) + 4;
28 int z = zo + random->nextInt(16);
29 int tile = level->getTile(x, y, z);
30 if (tile == Tile::stone_Id)
31 {
32 level->setTileAndData(x, y, z, Tile::emeraldOre_Id, 0, Tile::UPDATE_CLIENTS);
33 }
34 }
35 }
36
37 for (int i = 0; i < 7; i++)
38 {
39 int x = xo + random->nextInt(16);
40 int y = random->nextInt(Level::genDepth / 2);
41 int z = zo + random->nextInt(16);
42 silverfishFeature->place(level, random, x, y, z);
43 }
44}