the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "ChunkSource.h"
5
6#ifndef _CONTENT_PACKAGE
7#define _OVERRIDE_HEIGHTMAP
8#endif
9
10class ProgressListener;
11class LargeFeature;
12class StrongholdFeature;
13class VillageFeature;
14class MineShaftFeature;
15class RandomScatteredLargeFeature;
16
17class CustomLevelSource : public ChunkSource
18{
19public:
20 static const double SNOW_CUTOFF;
21 static const double SNOW_SCALE;
22 static const bool FLOATING_ISLANDS = false;
23 static const int CHUNK_HEIGHT = 8;
24 static const int CHUNK_WIDTH = 4;
25
26private:
27
28#ifdef _OVERRIDE_HEIGHTMAP
29 Random *random;
30 Random *pprandom; // 4J - added
31 PerlinNoise *perlinNoise3;
32 LargeFeature *caveFeature;
33 StrongholdFeature *strongholdFeature;
34 VillageFeature *villageFeature;
35 MineShaftFeature *mineShaftFeature;
36 RandomScatteredLargeFeature *scatteredFeature;
37 LargeFeature *canyonFeature;
38 Level *level;
39#endif
40
41 byteArray m_heightmapOverride;
42 byteArray m_waterheightOverride;
43
44private:
45
46 const bool generateStructures;
47
48public:
49 CustomLevelSource(Level *level, __int64 seed, bool generateStructures);
50 ~CustomLevelSource();
51
52public:
53 void prepareHeights(int xOffs, int zOffs, byteArray blocks);
54
55public:
56 void buildSurfaces(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes);
57
58private:
59 virtual LevelChunk *create(int x, int z);
60
61public:
62 virtual LevelChunk *getChunk(int xOffs, int zOffs);
63 virtual void lightChunk(LevelChunk *lc); // 4J added
64
65public:
66 virtual bool hasChunk(int x, int y);
67
68private:
69 void calcWaterDepths(ChunkSource *parent, int xt, int zt);
70
71public:
72 virtual void postProcess(ChunkSource *parent, int xt, int zt);
73 virtual bool save(bool force, ProgressListener *progressListener);
74 virtual bool tick();
75 virtual bool shouldSave();
76 virtual wstring gatherStats();
77
78public:
79 virtual vector<Biome::MobSpawnerData *> *getMobsAt(MobCategory *mobCategory, int x, int y, int z);
80 virtual TilePos *findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z);
81 virtual void recreateLogicStructuresForChunk(int chunkX, int chunkZ);
82};