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 "GameRules.h"
5
6class Player;
7class CompoundTag;
8class LevelSettings;
9class LevelType;
10class GameType;
11
12class LevelData
13{
14 friend class DerivedLevelData;
15private:
16 __int64 seed;
17 LevelType *m_pGenerator;// = LevelType.normal;
18 wstring generatorOptions;
19 int xSpawn;
20 int ySpawn;
21 int zSpawn;
22 __int64 gameTime;
23 __int64 dayTime;
24 __int64 lastPlayed;
25 __int64 sizeOnDisk;
26// CompoundTag *loadedPlayerTag; // 4J removed
27 int dimension;
28 wstring levelName;
29 int version;
30
31 bool raining;
32 int rainTime;
33
34 bool thundering;
35 int thunderTime;
36 GameType *gameType;
37 bool generateMapFeatures;
38 bool hardcore;
39 bool allowCommands;
40 bool initialized;
41 bool newSeaLevel; // 4J added
42 bool hasBeenInCreative; // 4J added
43 bool spawnBonusChest; // 4J added
44 int m_xzSize; // 4J Added
45#ifdef _LARGE_WORLDS
46 int m_xzSizeOld; // 4J MGH Added, for expanding worlds
47 int m_hellScaleOld;
48 bool m_classicEdgeMoat;
49 bool m_smallEdgeMoat;
50 bool m_mediumEdgeMoat;
51#endif
52 int m_hellScale; // 4J Added
53
54 // 4J added
55 int xStronghold;
56 int yStronghold;
57 int zStronghold;
58 bool bStronghold;
59
60 int xStrongholdEndPortal;
61 int zStrongholdEndPortal;
62 bool bStrongholdEndPortal;
63
64 GameRules gameRules;
65
66protected:
67 LevelData();
68
69public:
70 LevelData(CompoundTag *tag);
71 LevelData(LevelSettings *levelSettings, const wstring& levelName);
72 LevelData(LevelData *copy);
73 CompoundTag *createTag();
74 CompoundTag *createTag(vector<shared_ptr<Player> > *players);
75
76 enum
77 {
78 DIMENSION_NETHER=-1,
79 DIMENSION_OVERWORLD=0,
80 DIMENSION_END=1
81 };
82
83protected:
84 virtual void setTagData(CompoundTag *tag); // 4J - removed CompoundTag *playerTag
85
86public:
87 virtual __int64 getSeed();
88 virtual int getXSpawn();
89 virtual int getYSpawn();
90 virtual int getZSpawn();
91 virtual int getXStronghold();
92 virtual int getZStronghold();
93 virtual int getXStrongholdEndPortal();
94 virtual int getZStrongholdEndPortal();
95 virtual __int64 getGameTime();
96 virtual __int64 getDayTime();
97 virtual __int64 getSizeOnDisk();
98 virtual CompoundTag *getLoadedPlayerTag();
99 //int getDimension(); // 4J Removed TU 9 as it's never accurate
100 virtual void setSeed(__int64 seed);
101 virtual void setXSpawn(int xSpawn);
102 virtual void setYSpawn(int ySpawn);
103 virtual void setZSpawn(int zSpawn);
104 virtual void setHasStronghold();
105 virtual bool getHasStronghold();
106 virtual void setXStronghold(int xStronghold);
107 virtual void setZStronghold(int zStronghold);
108 virtual void setHasStrongholdEndPortal();
109 virtual bool getHasStrongholdEndPortal();
110 virtual void setXStrongholdEndPortal(int xStrongholdEndPortal);
111 virtual void setZStrongholdEndPortal(int zStrongholdEndPortal);
112
113 virtual void setGameTime(__int64 time);
114 virtual void setDayTime(__int64 time);
115 virtual void setSizeOnDisk(__int64 sizeOnDisk);
116 virtual void setLoadedPlayerTag(CompoundTag *loadedPlayerTag);
117 //void setDimension(int dimension); // 4J Removed TU 9 as it's never used
118 virtual void setSpawn(int xSpawn, int ySpawn, int zSpawn);
119 virtual wstring getLevelName();
120 virtual void setLevelName(const wstring& levelName);
121 virtual int getVersion();
122 virtual void setVersion(int version);
123 virtual __int64 getLastPlayed();
124 virtual bool isThundering();
125 virtual void setThundering(bool thundering);
126 virtual int getThunderTime();
127 virtual void setThunderTime(int thunderTime);
128 virtual bool isRaining();
129 virtual void setRaining(bool raining);
130 virtual int getRainTime();
131 virtual void setRainTime(int rainTime);
132 virtual GameType *getGameType();
133 virtual bool isGenerateMapFeatures();
134 virtual bool getSpawnBonusChest();
135 virtual void setGameType(GameType *gameType);
136 virtual bool useNewSeaLevel();
137 virtual bool getHasBeenInCreative(); // 4J Added
138 virtual void setHasBeenInCreative(bool value); // 4J Added
139 virtual LevelType *getGenerator();
140 virtual void setGenerator(LevelType *generator);
141 virtual wstring getGeneratorOptions();
142 virtual void setGeneratorOptions(const wstring &options);
143 virtual bool isHardcore();
144 virtual bool getAllowCommands();
145 virtual void setAllowCommands(bool allowCommands);
146 virtual bool isInitialized();
147 virtual void setInitialized(bool initialized);
148 virtual GameRules *getGameRules();
149 virtual int getXZSize(); // 4J Added
150#ifdef _LARGE_WORLDS
151 virtual int getXZSizeOld(); // 4J Added
152 virtual void getMoatFlags(bool* bClassicEdgeMoat, bool* bSmallEdgeMoat, bool* bMediumEdgeMoat); //4J MGH - added
153 virtual int getXZHellSizeOld(); // 4J Added
154
155#endif
156 virtual int getHellScale(); // 4J Addded
157};