DerivedWorldInfo .java

net.minecraft.world.storage.DerivedWorldInfo (class): members: theWorldInfo, getPlayerNBTTagCompound, getGameRulesInstance, setServerInitialized, setSpawn.

net.minecraft.world.storageclass311 linescommonextends WorldInfo6.0 KB

API Surface (43)

NBTTagCompound getNBTTagCompound()
NBTTagCompound cloneNBTCompound(NBTTagCompound nbt)
long getSeed()
int getSpawnX()
int getSpawnY()
int getSpawnZ()
long getWorldTotalTime()
long getWorldTime()
long getSizeOnDisk()
NBTTagCompound getPlayerNBTTagCompound()
String getWorldName()
int getSaveVersion()
long getLastTimePlayed()
boolean isThundering()
int getThunderTime()
boolean isRaining()
int getRainTime()
WorldSettings.GameType getGameType()
void setSpawnX(int x)
void setSpawnY(int y)
void setSpawnZ(int z)
void setWorldTotalTime(long time)
void setWorldTime(long time)
void setSpawn(BlockPos spawnPoint)
void setWorldName(String worldName)
void setSaveVersion(int version)
void setThundering(boolean thunderingIn)
void setThunderTime(int time)
void setRaining(boolean isRaining)
void setRainTime(int time)
boolean isMapFeaturesEnabled()
boolean isHardcoreModeEnabled()
WorldType getTerrainType()
void setTerrainType(WorldType type)
boolean areCommandsAllowed()
void setAllowCommands(boolean allow)
boolean isInitialized()
void setServerInitialized(boolean initializedIn)
GameRules getGameRulesInstance()
EnumDifficulty getDifficulty()
void setDifficulty(EnumDifficulty newDifficulty)
boolean isDifficultyLocked()
void setDifficultyLocked(boolean locked)

Fields & Constants (1)

theWorldInfo

Full Source

DerivedWorldInfo.java311 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.world.storage;
2
3
import net.minecraft.nbt.NBTTagCompound;
4
import net.minecraft.util.BlockPos;
5
import net.minecraft.world.EnumDifficulty;
6
import net.minecraft.world.GameRules;
7
import net.minecraft.world.WorldSettings;
8
import net.minecraft.world.WorldType;
9
10
public class DerivedWorldInfo extends WorldInfo
11
{
12
    /** Instance of WorldInfo. */
13
    private final WorldInfo theWorldInfo;
14
15
    public DerivedWorldInfo(WorldInfo p_i2145_1_)
16
    {
17
        this.theWorldInfo = p_i2145_1_;
18
    }
19
20
    /**
21
     * Gets the NBTTagCompound for the worldInfo
22
     */
23
    public NBTTagCompound getNBTTagCompound()
24
    {
25
        return this.theWorldInfo.getNBTTagCompound();
26
    }
27
28
    /**
29
     * Creates a new NBTTagCompound for the world, with the given NBTTag as the "Player"
30
     */
31
    public NBTTagCompound cloneNBTCompound(NBTTagCompound nbt)
32
    {
33
        return this.theWorldInfo.cloneNBTCompound(nbt);
34
    }
35
36
    /**
37
     * Returns the seed of current world.
38
     */
39
    public long getSeed()
40
    {
41
        return this.theWorldInfo.getSeed();
42
    }
43
44
    /**
45
     * Returns the x spawn position
46
     */
47
    public int getSpawnX()
48
    {
49
        return this.theWorldInfo.getSpawnX();
50
    }
51
52
    /**
53
     * Return the Y axis spawning point of the player.
54
     */
55
    public int getSpawnY()
56
    {
57
        return this.theWorldInfo.getSpawnY();
58
    }
59
60
    /**
61
     * Returns the z spawn position
62
     */
63
    public int getSpawnZ()
64
    {
65
        return this.theWorldInfo.getSpawnZ();
66
    }
67
68
    public long getWorldTotalTime()
69
    {
70
        return this.theWorldInfo.getWorldTotalTime();
71
    }
72
73
    /**
74
     * Get current world time
75
     */
76
    public long getWorldTime()
77
    {
78
        return this.theWorldInfo.getWorldTime();
79
    }
80
81
    public long getSizeOnDisk()
82
    {
83
        return this.theWorldInfo.getSizeOnDisk();
84
    }
85
86
    /**
87
     * Returns the player's NBTTagCompound to be loaded
88
     */
89
    public NBTTagCompound getPlayerNBTTagCompound()
90
    {
91
        return this.theWorldInfo.getPlayerNBTTagCompound();
92
    }
93
94
    /**
95
     * Get current world name
96
     */
97
    public String getWorldName()
98
    {
99
        return this.theWorldInfo.getWorldName();
100
    }
101
102
    /**
103
     * Returns the save version of this world
104
     */
105
    public int getSaveVersion()
106
    {
107
        return this.theWorldInfo.getSaveVersion();
108
    }
109
110
    /**
111
     * Return the last time the player was in this world.
112
     */
113
    public long getLastTimePlayed()
114
    {
115
        return this.theWorldInfo.getLastTimePlayed();
116
    }
117
118
    /**
119
     * Returns true if it is thundering, false otherwise.
120
     */
121
    public boolean isThundering()
122
    {
123
        return this.theWorldInfo.isThundering();
124
    }
125
126
    /**
127
     * Returns the number of ticks until next thunderbolt.
128
     */
129
    public int getThunderTime()
130
    {
131
        return this.theWorldInfo.getThunderTime();
132
    }
133
134
    /**
135
     * Returns true if it is raining, false otherwise.
136
     */
137
    public boolean isRaining()
138
    {
139
        return this.theWorldInfo.isRaining();
140
    }
141
142
    /**
143
     * Return the number of ticks until rain.
144
     */
145
    public int getRainTime()
146
    {
147
        return this.theWorldInfo.getRainTime();
148
    }
149
150
    /**
151
     * Gets the GameType.
152
     */
153
    public WorldSettings.GameType getGameType()
154
    {
155
        return this.theWorldInfo.getGameType();
156
    }
157
158
    /**
159
     * Set the x spawn position to the passed in value
160
     */
161
    public void setSpawnX(int x)
162
    {
163
    }
164
165
    /**
166
     * Sets the y spawn position
167
     */
168
    public void setSpawnY(int y)
169
    {
170
    }
171
172
    /**
173
     * Set the z spawn position to the passed in value
174
     */
175
    public void setSpawnZ(int z)
176
    {
177
    }
178
179
    public void setWorldTotalTime(long time)
180
    {
181
    }
182
183
    /**
184
     * Set current world time
185
     */
186
    public void setWorldTime(long time)
187
    {
188
    }
189
190
    public void setSpawn(BlockPos spawnPoint)
191
    {
192
    }
193
194
    public void setWorldName(String worldName)
195
    {
196
    }
197
198
    /**
199
     * Sets the save version of the world
200
     */
201
    public void setSaveVersion(int version)
202
    {
203
    }
204
205
    /**
206
     * Sets whether it is thundering or not.
207
     */
208
    public void setThundering(boolean thunderingIn)
209
    {
210
    }
211
212
    /**
213
     * Defines the number of ticks until next thunderbolt.
214
     */
215
    public void setThunderTime(int time)
216
    {
217
    }
218
219
    /**
220
     * Sets whether it is raining or not.
221
     */
222
    public void setRaining(boolean isRaining)
223
    {
224
    }
225
226
    /**
227
     * Sets the number of ticks until rain.
228
     */
229
    public void setRainTime(int time)
230
    {
231
    }
232
233
    /**
234
     * Get whether the map features (e.g. strongholds) generation is enabled or disabled.
235
     */
236
    public boolean isMapFeaturesEnabled()
237
    {
238
        return this.theWorldInfo.isMapFeaturesEnabled();
239
    }
240
241
    /**
242
     * Returns true if hardcore mode is enabled, otherwise false
243
     */
244
    public boolean isHardcoreModeEnabled()
245
    {
246
        return this.theWorldInfo.isHardcoreModeEnabled();
247
    }
248
249
    public WorldType getTerrainType()
250
    {
251
        return this.theWorldInfo.getTerrainType();
252
    }
253
254
    public void setTerrainType(WorldType type)
255
    {
256
    }
257
258
    /**
259
     * Returns true if commands are allowed on this World.
260
     */
261
    public boolean areCommandsAllowed()
262
    {
263
        return this.theWorldInfo.areCommandsAllowed();
264
    }
265
266
    public void setAllowCommands(boolean allow)
267
    {
268
    }
269
270
    /**
271
     * Returns true if the World is initialized.
272
     */
273
    public boolean isInitialized()
274
    {
275
        return this.theWorldInfo.isInitialized();
276
    }
277
278
    /**
279
     * Sets the initialization status of the World.
280
     */
281
    public void setServerInitialized(boolean initializedIn)
282
    {
283
    }
284
285
    /**
286
     * Gets the GameRules class Instance.
287
     */
288
    public GameRules getGameRulesInstance()
289
    {
290
        return this.theWorldInfo.getGameRulesInstance();
291
    }
292
293
    public EnumDifficulty getDifficulty()
294
    {
295
        return this.theWorldInfo.getDifficulty();
296
    }
297
298
    public void setDifficulty(EnumDifficulty newDifficulty)
299
    {
300
    }
301
302
    public boolean isDifficultyLocked()
303
    {
304
        return this.theWorldInfo.isDifficultyLocked();
305
    }
306
307
    public void setDifficultyLocked(boolean locked)
308
    {
309
    }
310
}
311

Deobfuscated MCP 1.8.9 source of DerivedWorldInfo from Marcelektro/MavenMCP-1.8.9 (net/minecraft/world/storage/DerivedWorldInfo.java), stored verbatim.