API Surface (1) String getSerializedName()
Code Graph: Dependencies (1) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
LoggedChatEvent.java 39 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.client.multiplayer.chat;
2
3 import com.mojang.serialization.Codec;
4 import com.mojang.serialization.MapCodec;
5 import java.util.function.Supplier;
6 import net.fabricmc.api.EnvType;
7 import net.fabricmc.api.Environment;
8 import net.minecraft.util.StringRepresentable;
9
10 @Environment(EnvType.CLIENT)
11 public interface LoggedChatEvent {
12 Codec<LoggedChatEvent> CODEC = StringRepresentable.fromEnum(LoggedChatEvent.Type::values).dispatch(LoggedChatEvent::type, LoggedChatEvent.Type::codec);
13
14 LoggedChatEvent.Type type();
15
16 @Environment(EnvType.CLIENT)
17 enum Type implements StringRepresentable {
18 PLAYER("player", () -> LoggedChatMessage.Player.CODEC),
19 SYSTEM("system", () -> LoggedChatMessage.System.CODEC);
20
21 private final String serializedName;
22 private final Supplier<MapCodec<? extends LoggedChatEvent>> codec;
23
24 Type(final String serializedName, final Supplier<MapCodec<? extends LoggedChatEvent>> codec) {
25 this.serializedName = serializedName;
26 this.codec = codec;
27 }
28
29 private MapCodec<? extends LoggedChatEvent> codec() {
30 return this.codec.get();
31 }
32
33 @Override
34 public String getSerializedName() {
35 return this.serializedName;
36 }
37 }
38 }
39
Decompiled Minecraft 26.3 source of LoggedChatEvent (net/minecraft/client/multiplayer/chat/LoggedChatEvent.java) with Mojang official mappings, stored verbatim on the site.