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 "SkyIslandDimension.h"
3#include "net.minecraft.world.level.h"
4#include "net.minecraft.world.level.biome.h"
5#include "net.minecraft.world.level.tile.h"
6#include "net.minecraft.world.level.levelgen.h"
7
8void SkyIslandDimension::init()
9{
10 biomeSource = new FixedBiomeSource(Biome::sky, 0.5f, 0);
11 id = 1;
12}
13
14ChunkSource *SkyIslandDimension::createRandomLevelSource() const
15{
16 return new SkyIslandRandomLevelSource(level, level->getSeed());
17}
18
19float SkyIslandDimension::getTimeOfDay(__int64 time, float a) const
20{
21 return 0.0f;
22}
23
24float *SkyIslandDimension::getSunriseColor(float td, float a)
25{
26 return NULL;
27}
28
29Vec3 *SkyIslandDimension::getFogColor(float td, float a) const
30{
31 int fogColor = 0x8080a0;
32 float br = Mth::cos(td * PI * 2) * 2 + 0.5f;
33 if (br < 0.0f) br = 0.0f;
34 if (br > 1.0f) br = 1.0f;
35
36 float r = ((fogColor >> 16) & 0xff) / 255.0f;
37 float g = ((fogColor >> 8) & 0xff) / 255.0f;
38 float b = ((fogColor) & 0xff) / 255.0f;
39 r *= br * 0.94f + 0.06f;
40 g *= br * 0.94f + 0.06f;
41 b *= br * 0.91f + 0.09f;
42
43 return Vec3::newTemp(r, g, b);
44}
45
46bool SkyIslandDimension::hasGround()
47{
48 return false;
49}
50
51float SkyIslandDimension::getCloudHeight()
52{
53 return 8;
54}
55
56bool SkyIslandDimension::isValidSpawn(int x, int z) const
57{
58 int topTile = level->getTopTile(x, z);
59
60 if (topTile == 0) return false;
61
62 return Tile::tiles[topTile]->material->blocksMotion();
63}