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 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbootstrap(ExtraCodecs.LateBoundIdMapper<String, com.mojang.serialization.MapCodec<? extends ComponentContents>> contentTypes) private static com.mojang.serialization.Codec<Component> createCodec(com.mojang.serialization.Codec<Component> topSerializer) private static MutableComponentcreateFromList(List<Component> list) static <T> com.mojang.serialization.MapCodec<T> createLegacyComponentMatcher(ExtraCodecs.LateBoundIdMapper<String, com.mojang.serialization.MapCodec<? extends T>> types, Function<T, com.mojang.serialization.MapCodec<? extends T>> codecGetter, String typeFieldName) static com.mojang.serialization.Codec<Component> 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
public static <T> com.mojang.serialization.MapCodec<T> createLegacyComponentMatcher(ExtraCodecs.LateBoundIdMapper<String, com.mojang.serialization.MapCodec<? extends T>> types, Function<T, com.mojang.serialization.MapCodec<? extends T>> codecGetter, String typeFieldName) -
createCodec
-
bootstrap
private static void bootstrap(ExtraCodecs.LateBoundIdMapper<String, com.mojang.serialization.MapCodec<? extends ComponentContents>> contentTypes)
-