the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3class Biome;
4#include "StructureFeature.h"
5
6#include "StructureStart.h"
7
8
9#include "ChunkPos.h"
10
11// 4J Stu Added
12// We can get away with a few more attempts on new-gen consoles
13#ifdef _LARGE_WORLDS
14#define MAX_STRONGHOLD_ATTEMPTS 30
15#else
16#define MAX_STRONGHOLD_ATTEMPTS 10
17#endif
18
19class StrongholdFeature : public StructureFeature
20{
21public:
22 static const wstring OPTION_DISTANCE;
23 static const wstring OPTION_COUNT;
24 static const wstring OPTION_SPREAD;
25
26public:
27 static void staticCtor();
28private:
29 static vector<Biome *> allowedBiomes;
30
31 bool isSpotSelected;
32 static const int strongholdPos_length = 1;// Java game has 3, but xbox game only has 1 because of the world size; // 4J added
33 ChunkPos *strongholdPos[strongholdPos_length];
34 double distance;
35 int spread;
36
37 void _init();
38
39public:
40 StrongholdFeature();
41 StrongholdFeature(unordered_map<wstring, wstring> options);
42 ~StrongholdFeature();
43
44 wstring getFeatureName();
45
46protected:
47 virtual bool isFeatureChunk(int x, int z, bool bIsSuperflat=false);
48 vector<TilePos> *getGuesstimatedFeaturePositions();
49 virtual StructureStart *createStructureStart(int x, int z);
50
51public:
52 class StrongholdStart : public StructureStart
53 {
54 public:
55 static StructureStart *Create() { return new StrongholdStart(); }
56 virtual EStructureStart GetType() { return eStructureStart_StrongholdStart; }
57
58 public:
59 StrongholdStart();
60 StrongholdStart(Level *level, Random *random, int chunkX, int chunkZ);
61 };
62};