RealmsSlotUpdateDto .java

com.mojang.realmsclient.dto.RealmsSlotUpdateDto (record): members: slotId, spawnProtection, forceGameMode, difficulty, gameMode, slotName, version.

com.mojang.realmsclient.dtorecord38 linescommon1.2 KB

Implements

API Surface (0)

No public/protected methods detected (fields or constants only).

String literals (11)

"slotId"
"spawnProtection"
"forceGameMode"
"difficulty"
"gameMode"
"slotName"
"version"
"compatibility"
"worldTemplateId"
"worldTemplateImage"
"hardcore"

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

RealmsSlotUpdateDto.java38 lines · Minecraft 26.3 · verbatim
1
package com.mojang.realmsclient.dto;
2
3
import com.google.gson.annotations.SerializedName;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
import org.jspecify.annotations.Nullable;
7
8
@Environment(EnvType.CLIENT)
9
public record RealmsSlotUpdateDto(
10
	@SerializedName("slotId") int slotId,
11
	@SerializedName("spawnProtection") int spawnProtection,
12
	@SerializedName("forceGameMode") boolean forceGameMode,
13
	@SerializedName("difficulty") int difficulty,
14
	@SerializedName("gameMode") int gameMode,
15
	@SerializedName("slotName") String slotName,
16
	@SerializedName("version") String version,
17
	@SerializedName("compatibility") RealmsServer.Compatibility compatibility,
18
	@SerializedName("worldTemplateId") long templateId,
19
	@SerializedName("worldTemplateImage") @Nullable String templateImage,
20
	@SerializedName("hardcore") boolean hardcore
21
) implements ReflectionBasedSerialization {
22
	public RealmsSlotUpdateDto(final int slotId, final RealmsWorldOptions options, final boolean hardcore) {
23
		this(
24
			slotId,
25
			options.spawnProtection,
26
			options.forceGameMode,
27
			options.difficulty,
28
			options.gameMode,
29
			options.getSlotName(slotId),
30
			options.version,
31
			options.compatibility,
32
			options.templateId,
33
			options.templateImage,
34
			hardcore
35
		);
36
	}
37
}
38

Decompiled Minecraft 26.3 source of RealmsSlotUpdateDto (com/mojang/realmsclient/dto/RealmsSlotUpdateDto.java) with Mojang official mappings, stored verbatim on the site.