RealmsJoinInformation.java
com.mojang.realmsclient.dto.RealmsJoinInformation
信息
- 全限定名:com.mojang.realmsclient.dto.RealmsJoinInformation
- 类型:public record
- 包:com.mojang.realmsclient.dto
- 源码路径:src/main/java/com/mojang/realmsclient/dto/RealmsJoinInformation.java
- 起始行号:L11
- 实现:ReflectionBasedSerialization
- 职责:
TODO
字段/常量
-
LOGGER- 类型:
Logger - 修饰符:
private static final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
EMPTY- 类型:
RealmsJoinInformation - 修饰符:
private static final - 源码定位:
L18 - 说明:
TODO
- 类型:
内部类/嵌套类型
com.mojang.realmsclient.dto.RealmsJoinInformation.RegionData- 类型:
record - 修饰符:
public - 源码定位:
L36 - 说明:
TODO
- 类型:
构造器
- 无
方法
下面的方法块按源码顺序生成。
public static RealmsJoinInformation parse(GuardedSerializer gson, String json) @ L20
- 方法名:parse
- 源码定位:L20
- 返回类型:RealmsJoinInformation
- 修饰符:public static
参数:
- gson: GuardedSerializer
- json: String
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public record RealmsJoinInformation(
@SerializedName("address") @Nullable String address,
@SerializedName("resourcePackUrl") @Nullable String resourcePackUrl,
@SerializedName("resourcePackHash") @Nullable String resourcePackHash,
@SerializedName("sessionRegionData") RealmsJoinInformation.@Nullable RegionData regionData
) implements ReflectionBasedSerialization {
private static final Logger LOGGER = LogUtils.getLogger();
private static final RealmsJoinInformation EMPTY = new RealmsJoinInformation(null, null, null, null);
public static RealmsJoinInformation parse(GuardedSerializer gson, String json) {
try {
RealmsJoinInformation server = gson.fromJson(json, RealmsJoinInformation.class);
if (server == null) {
LOGGER.error("Could not parse RealmsServerAddress: {}", json);
return EMPTY;
} else {
return server;
}
} catch (Exception var3) {
LOGGER.error("Could not parse RealmsServerAddress", (Throwable)var3);
return EMPTY;
}
}
@OnlyIn(Dist.CLIENT)
public record RegionData(
@SerializedName("regionName") @Nullable RealmsRegion region, @SerializedName("serviceQuality") @Nullable ServiceQuality serviceQuality
) implements ReflectionBasedSerialization {
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
实现
- 引用位置: