RealmsSlotUpdateDto.java

com.mojang.realmsclient.dto.RealmsSlotUpdateDto

信息

  • 全限定名:com.mojang.realmsclient.dto.RealmsSlotUpdateDto
  • 类型:public record
  • 包:com.mojang.realmsclient.dto
  • 源码路径:src/main/java/com/mojang/realmsclient/dto/RealmsSlotUpdateDto.java
  • 起始行号:L9
  • 实现:ReflectionBasedSerialization
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

构造器

public RealmsSlotUpdateDto(int slotId, RealmsWorldOptions options, boolean hardcore) @ L22

  • 构造器名:RealmsSlotUpdateDto
  • 源码定位:L22
  • 修饰符:public

参数:

  • slotId: int
  • options: RealmsWorldOptions
  • hardcore: boolean

说明:

TODO

方法

下面的方法块按源码顺序生成。

代码

@OnlyIn(Dist.CLIENT)
public record RealmsSlotUpdateDto(
    @SerializedName("slotId") int slotId,
    @SerializedName("spawnProtection") int spawnProtection,
    @SerializedName("forceGameMode") boolean forceGameMode,
    @SerializedName("difficulty") int difficulty,
    @SerializedName("gameMode") int gameMode,
    @SerializedName("slotName") String slotName,
    @SerializedName("version") String version,
    @SerializedName("compatibility") RealmsServer.Compatibility compatibility,
    @SerializedName("worldTemplateId") long templateId,
    @SerializedName("worldTemplateImage") @Nullable String templateImage,
    @SerializedName("hardcore") boolean hardcore
) implements ReflectionBasedSerialization {
    public RealmsSlotUpdateDto(int slotId, RealmsWorldOptions options, boolean hardcore) {
        this(
            slotId,
            options.spawnProtection,
            options.forceGameMode,
            options.difficulty,
            options.gameMode,
            options.getSlotName(slotId),
            options.version,
            options.compatibility,
            options.templateId,
            options.templateImage,
            hardcore
        );
    }
}

引用的其他类