LoggedChatEvent.java
net.minecraft.client.multiplayer.chat.LoggedChatEvent
信息
- 全限定名:net.minecraft.client.multiplayer.chat.LoggedChatEvent
- 类型:public interface
- 包:net.minecraft.client.multiplayer.chat
- 源码路径:src/main/java/net/minecraft/client/multiplayer/chat/LoggedChatEvent.java
- 起始行号:L11
- 职责:
TODO
字段/常量
CODEC- 类型:
Codec<LoggedChatEvent> - 修饰符:
package-private - 源码定位:
L12 - 说明:
TODO
- 类型:
内部类/嵌套类型
net.minecraft.client.multiplayer.chat.LoggedChatEvent.Type- 类型:
enum - 修饰符:
public static - 源码定位:
L17 - 说明:
TODO
- 类型:
构造器
- 无
方法
下面的方法块按源码顺序生成。
LoggedChatEvent.Type type() @ L14
- 方法名:type
- 源码定位:L14
- 返回类型:LoggedChatEvent.Type
- 修饰符:package-private
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public interface LoggedChatEvent {
Codec<LoggedChatEvent> CODEC = StringRepresentable.fromEnum(LoggedChatEvent.Type::values).dispatch(LoggedChatEvent::type, LoggedChatEvent.Type::codec);
LoggedChatEvent.Type type();
@OnlyIn(Dist.CLIENT)
public static enum Type implements StringRepresentable {
PLAYER("player", () -> LoggedChatMessage.Player.CODEC),
SYSTEM("system", () -> LoggedChatMessage.System.CODEC);
private final String serializedName;
private final Supplier<MapCodec<? extends LoggedChatEvent>> codec;
private Type(String serializedName, Supplier<MapCodec<? extends LoggedChatEvent>> codec) {
this.serializedName = serializedName;
this.codec = codec;
}
private MapCodec<? extends LoggedChatEvent> codec() {
return this.codec.get();
}
@Override
public String getSerializedName() {
return this.serializedName;
}
}
}引用的其他类
- StringRepresentable
- 引用位置:
方法调用 - 关联成员:
StringRepresentable.fromEnum()
- 引用位置: