Class ComponentSerialization
java.lang.Object
net.minecraft.network.chat.ComponentSerialization
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbootstrap(ExtraCodecs.LateBoundIdMapper<String, MapCodec<? extends ComponentContents>> contentTypes) createCodec(Codec<Component> topSerializer) private static MutableComponentcreateFromList(List<Component> list) static <T> MapCodec<T> createLegacyComponentMatcher(ExtraCodecs.LateBoundIdMapper<String, MapCodec<? extends T>> types, Function<T, MapCodec<? extends T>> codecGetter, String typeFieldName) flatRestrictedCodec(int maxFlatSize)
-
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
-
-
Constructor Details
-
ComponentSerialization
public ComponentSerialization()
-
-
Method Details
-
flatRestrictedCodec
-
createFromList
-
createLegacyComponentMatcher
-
createCodec
-
bootstrap
private static void bootstrap(ExtraCodecs.LateBoundIdMapper<String, MapCodec<? extends ComponentContents>> contentTypes)
-