Package net.minecraft.network.chat
Class ComponentSerialization
java.lang.Object
net.minecraft.network.chat.ComponentSerialization
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<Component> static final com.mojang.serialization.Codec
<Component> static final StreamCodec
<RegistryFriendlyByteBuf, Optional<Component>> static final StreamCodec
<RegistryFriendlyByteBuf, Component> static final StreamCodec
<io.netty.buffer.ByteBuf, Component> static final StreamCodec
<RegistryFriendlyByteBuf, Optional<Component>> static final StreamCodec
<RegistryFriendlyByteBuf, Component> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static com.mojang.serialization.Codec
<Component> createCodec
(com.mojang.serialization.Codec<Component> p_310353_) private static MutableComponent
createFromList
(List<Component> p_312708_) static <T extends StringRepresentable,
E>
com.mojang.serialization.MapCodec<E> createLegacyComponentMatcher
(T[] p_312620_, Function<T, com.mojang.serialization.MapCodec<? extends E>> p_312447_, Function<E, T> p_309774_, String p_311665_) static com.mojang.serialization.Codec
<Component> flatCodec
(int p_330224_)
-
Field Details
-
CODEC
-
STREAM_CODEC
-
OPTIONAL_STREAM_CODEC
-
TRUSTED_STREAM_CODEC
-
TRUSTED_OPTIONAL_STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,Optional<Component>> TRUSTED_OPTIONAL_STREAM_CODEC -
TRUSTED_CONTEXT_FREE_STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf,Component> TRUSTED_CONTEXT_FREE_STREAM_CODEC -
FLAT_CODEC
-
-
Constructor Details
-
ComponentSerialization
public ComponentSerialization()
-
-
Method Details
-
flatCodec
-
createFromList
-
createLegacyComponentMatcher
public static <T extends StringRepresentable,E> com.mojang.serialization.MapCodec<E> createLegacyComponentMatcher(T[] p_312620_, Function<T, com.mojang.serialization.MapCodec<? extends E>> p_312447_, Function<E, T> p_309774_, String p_311665_) -
createCodec
-