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.biome.h"
3#include "net.minecraft.world.level.levelgen.feature.h"
4#include "net.minecraft.world.level.tile.h"
5#include "net.minecraft.world.level.h"
6#include "net.minecraft.world.entity.animal.h"
7#include "JungleBiome.h"
8
9JungleBiome::JungleBiome(int id) : Biome(id)
10{
11 decorator->treeCount = 50;
12 decorator->grassCount = 25;
13 decorator->flowerCount = 4;
14
15 enemies.push_back(new MobSpawnerData(eTYPE_OCELOT, 2, 1, 1));
16
17 // make chicken a lot more common in the jungle
18 friendlies.push_back(new MobSpawnerData(eTYPE_CHICKEN, 10, 4, 4));
19}
20
21
22Feature *JungleBiome::getTreeFeature(Random *random)
23{
24 if (random->nextInt(10) == 0)
25 {
26 return new BasicTree(false); // 4J used to return member fancyTree, now returning newly created object so that caller can be consistently resposible for cleanup
27 }
28 if (random->nextInt(2) == 0)
29 {
30 return new GroundBushFeature(TreeTile::JUNGLE_TRUNK, LeafTile::NORMAL_LEAF);
31 }
32 if (random->nextInt(3) == 0)
33 {
34 return new MegaTreeFeature(false, 10 + random->nextInt(20), TreeTile::JUNGLE_TRUNK, LeafTile::JUNGLE_LEAF);
35 }
36 return new TreeFeature(false, 4 + random->nextInt(7), TreeTile::JUNGLE_TRUNK, LeafTile::JUNGLE_LEAF, true);
37}
38
39Feature *JungleBiome::getGrassFeature(Random *random)
40{
41 if (random->nextInt(4) == 0)
42 {
43 return new TallGrassFeature(Tile::tallgrass_Id, TallGrass::FERN);
44 }
45 return new TallGrassFeature(Tile::tallgrass_Id, TallGrass::TALL_GRASS);
46}
47
48void JungleBiome::decorate(Level *level, Random *random, int xo, int zo)
49{
50 Biome::decorate(level, random, xo, zo);
51
52 PIXBeginNamedEvent(0, "Adding vines");
53 VinesFeature *vines = new VinesFeature();
54
55 for (int i = 0; i < 50; i++)
56 {
57 int x = xo + random->nextInt(16) + 8;
58 int y = Level::genDepth / 2;
59 int z = zo + random->nextInt(16) + 8;
60 vines->place(level, random, x, y, z);
61 }
62 PIXEndNamedEvent();
63}