the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 61 lines 1.7 kB view raw
1#pragma once 2 3#include "ChunkSource.h" 4class PerlinNoise; 5 6class TheEndLevelRandomLevelSource : public ChunkSource 7{ 8public: 9 static const double SNOW_CUTOFF; 10 static const double SNOW_SCALE; 11 static const bool FLOATING_ISLANDS; 12 13 static const int CHUNK_HEIGHT = 4; 14 static const int CHUNK_WIDTH = 8; 15private: 16 Random *random; 17 Random *pprandom; 18 19private: 20 PerlinNoise *lperlinNoise1; 21 PerlinNoise *lperlinNoise2; 22 PerlinNoise *perlinNoise1; 23public: 24 PerlinNoise *scaleNoise; 25 PerlinNoise *depthNoise; 26 PerlinNoise *forestNoise; 27 28 29private: 30 Level *level; 31 32public: 33 TheEndLevelRandomLevelSource(Level *level, __int64 seed); 34 ~TheEndLevelRandomLevelSource(); 35 36 void prepareHeights(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes); 37 void buildSurfaces(int xOffs, int zOffs, byteArray blocks, BiomeArray biomes); 38 39public: 40 virtual LevelChunk *create(int x, int z); 41 virtual LevelChunk *getChunk(int xOffs, int zOffs); 42 43private: 44 doubleArray getHeights(doubleArray buffer, int x, int y, int z, int xSize, int ySize, int zSize); 45 46public: 47 virtual bool hasChunk(int x, int y); 48private: 49 void calcWaterDepths(ChunkSource *parent, int xt, int zt); 50public: 51 virtual void postProcess(ChunkSource *parent, int xt, int zt); 52 virtual bool save(bool force, ProgressListener *progressListener); 53 virtual bool tick(); 54 virtual bool shouldSave(); 55 virtual wstring gatherStats(); 56 57public: 58 virtual vector<Biome::MobSpawnerData *> *getMobsAt(MobCategory *mobCategory, int x, int y, int z); 59 virtual TilePos *findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z); 60 virtual void recreateLogicStructuresForChunk(int chunkX, int chunkZ); 61};