public static final Codec<PlainMessage> CODEC = Codec.withAlternative(
20
MAP_CODEC.codec(), ComponentSerialization.CODEC, contents -> new PlainMessage(contents, 200)
21
);
22
23
@Override
24
public MapCodec<PlainMessage> mapCodec() {
25
return MAP_CODEC;
26
}
27
}
28
Decompiled Minecraft 26.3 source of PlainMessage (net/minecraft/server/dialog/body/PlainMessage.java) with Mojang official mappings, stored verbatim on the site.