DerivedLevelData .java

net.minecraft.world.level.storage.DerivedLevelData (class): members: setInitialized, setGameTime, setSpawn, isDifficultyLocked, isInitialized, getGameTime.

net.minecraft.world.level.storageclass89 linescommon1.9 KB

Implements

API Surface (15)

LevelData.RespawnData getRespawnData()
long getGameTime()
String getLevelName()
GameType getGameType()
void setGameTime(final long time)
void setSpawn(final LevelData.RespawnData respawnData)
void setGameType(final GameType gameType)
boolean isHardcore()
boolean isAllowCommands()
void setAllowCommands(final boolean allowCommands)
boolean isInitialized()
void setInitialized(final boolean initialized)
Difficulty getDifficulty()
boolean isDifficultyLocked()
void fillCrashReportCategory(final CrashReportCategory category, final LevelHeightAccessor levelHeightAccessor)

Fields & Constants (2)

worldData
wrapped

String literals (1)

"Derived"

Full Source

DerivedLevelData.java89 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.storage;
2
3
import net.minecraft.CrashReportCategory;
4
import net.minecraft.world.Difficulty;
5
import net.minecraft.world.level.GameType;
6
import net.minecraft.world.level.LevelHeightAccessor;
7
8
public class DerivedLevelData implements ServerLevelData {
9
	private final WorldData worldData;
10
	private final ServerLevelData wrapped;
11
12
	public DerivedLevelData(final WorldData worldData, final ServerLevelData wrapped) {
13
		this.worldData = worldData;
14
		this.wrapped = wrapped;
15
	}
16
17
	@Override
18
	public LevelData.RespawnData getRespawnData() {
19
		return this.wrapped.getRespawnData();
20
	}
21
22
	@Override
23
	public long getGameTime() {
24
		return this.wrapped.getGameTime();
25
	}
26
27
	@Override
28
	public String getLevelName() {
29
		return this.worldData.getLevelName();
30
	}
31
32
	@Override
33
	public GameType getGameType() {
34
		return this.worldData.getGameType();
35
	}
36
37
	@Override
38
	public void setGameTime(final long time) {
39
	}
40
41
	@Override
42
	public void setSpawn(final LevelData.RespawnData respawnData) {
43
		this.wrapped.setSpawn(respawnData);
44
	}
45
46
	@Override
47
	public void setGameType(final GameType gameType) {
48
	}
49
50
	@Override
51
	public boolean isHardcore() {
52
		return this.worldData.isHardcore();
53
	}
54
55
	@Override
56
	public boolean isAllowCommands() {
57
		return this.worldData.isAllowCommands();
58
	}
59
60
	@Override
61
	public void setAllowCommands(final boolean allowCommands) {
62
	}
63
64
	@Override
65
	public boolean isInitialized() {
66
		return this.wrapped.isInitialized();
67
	}
68
69
	@Override
70
	public void setInitialized(final boolean initialized) {
71
	}
72
73
	@Override
74
	public Difficulty getDifficulty() {
75
		return this.worldData.getDifficulty();
76
	}
77
78
	@Override
79
	public boolean isDifficultyLocked() {
80
		return this.worldData.isDifficultyLocked();
81
	}
82
83
	@Override
84
	public void fillCrashReportCategory(final CrashReportCategory category, final LevelHeightAccessor levelHeightAccessor) {
85
		category.setDetail("Derived", true);
86
		this.wrapped.fillCrashReportCategory(category, levelHeightAccessor);
87
	}
88
}
89

Decompiled Minecraft 26.3 source of DerivedLevelData (net/minecraft/world/level/storage/DerivedLevelData.java) with Mojang official mappings, stored verbatim on the site.