aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/LevelData.h
blob: 0afe9be241b81cfee986b4105885aa07549309d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#pragma once
using namespace std;

class Player;
class CompoundTag;
class LevelSettings;
class LevelType;
class GameType;

class LevelData
{
	friend class DerivedLevelData;
private:
	__int64 seed;
	LevelType *m_pGenerator;// = LevelType.normal;
    int xSpawn;
    int ySpawn;
    int zSpawn;
    __int64 time;
    __int64 lastPlayed;
    __int64 sizeOnDisk;
//    CompoundTag *loadedPlayerTag;	// 4J removed
    int dimension;
    wstring levelName;
    int version;

    bool raining;
    int rainTime;

    bool thundering;
    int thunderTime;
	GameType *gameType;
	bool generateMapFeatures;
	bool hardcore;
	bool allowCommands;
	bool initialized;
	bool newSeaLevel;		// 4J added
	bool hasBeenInCreative; // 4J added
	bool spawnBonusChest;   // 4J added
	int m_xzSize;	// 4J Added
	int m_hellScale; // 4J Added

	// 4J added
	int xStronghold;
	int yStronghold;
	int zStronghold;
	bool bStronghold;

	int xStrongholdEndPortal;
	int zStrongholdEndPortal;
	bool bStrongholdEndPortal;

protected:
	LevelData();

public:
	LevelData(CompoundTag *tag);
    LevelData(LevelSettings *levelSettings, const wstring& levelName);
    LevelData(LevelData *copy);
    CompoundTag *createTag();
    CompoundTag *createTag(vector<shared_ptr<Player> > *players);

	enum
	{
		DIMENSION_NETHER=-1,
		DIMENSION_OVERWORLD=0,
		DIMENSION_END=1
	};

protected:
	virtual void setTagData(CompoundTag *tag);		// 4J - removed  CompoundTag *playerTag

public:
	virtual  __int64 getSeed();
	virtual  int getXSpawn();
	virtual  int getYSpawn();
	virtual  int getZSpawn();
	virtual  int getXStronghold();
	virtual  int getZStronghold();
	virtual  int getXStrongholdEndPortal();
	virtual  int getZStrongholdEndPortal();
	virtual  __int64 getTime();
    virtual  __int64 getSizeOnDisk();
    virtual  CompoundTag *getLoadedPlayerTag();
    //int getDimension(); // 4J Removed TU 9 as it's never accurate
    virtual  void setSeed(__int64 seed);
    virtual  void setXSpawn(int xSpawn);
    virtual  void setYSpawn(int ySpawn);
    virtual  void setZSpawn(int zSpawn);
	virtual  void setHasStronghold();
	virtual  bool getHasStronghold();
	virtual  void setXStronghold(int xStronghold);
	virtual  void setZStronghold(int zStronghold);
	virtual  void setHasStrongholdEndPortal();
	virtual  bool getHasStrongholdEndPortal();
	virtual  void setXStrongholdEndPortal(int xStrongholdEndPortal);
	virtual  void setZStrongholdEndPortal(int zStrongholdEndPortal);

    virtual  void setTime(__int64 time);
    virtual  void setSizeOnDisk(__int64 sizeOnDisk);
    virtual  void setLoadedPlayerTag(CompoundTag *loadedPlayerTag);
    //void setDimension(int dimension); // 4J Removed TU 9 as it's never used
    virtual  void setSpawn(int xSpawn, int ySpawn, int zSpawn);
    virtual  wstring getLevelName();
    virtual  void setLevelName(const wstring& levelName);
    virtual  int getVersion();
    virtual  void setVersion(int version);
    virtual  __int64 getLastPlayed();
    virtual  bool isThundering();
    virtual  void setThundering(bool thundering);
    virtual  int getThunderTime();
    virtual  void setThunderTime(int thunderTime);
    virtual  bool isRaining();
    virtual  void setRaining(bool raining);
    virtual  int getRainTime();
    virtual  void setRainTime(int rainTime);
	virtual  GameType *getGameType();
	virtual  bool isGenerateMapFeatures();
	virtual  bool getSpawnBonusChest();
	virtual  void setGameType(GameType *gameType);
	virtual  bool useNewSeaLevel();
	virtual  bool getHasBeenInCreative(); // 4J Added
	virtual  void setHasBeenInCreative(bool value); // 4J Added
	virtual  LevelType *getGenerator();
	virtual  void setGenerator(LevelType *generator);
	virtual  bool isHardcore();
	virtual  bool getAllowCommands();
	virtual  void setAllowCommands(bool allowCommands);
	virtual  bool isInitialized();
	virtual  void setInitialized(bool initialized);
	virtual  int getXZSize(); // 4J Added
	virtual  int getHellScale(); // 4J Addded
};