Package net.minecraft.network.chat
Class ComponentSerialization
java.lang.Object
net.minecraft.network.chat.ComponentSerialization
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) 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>> mapper) private static com.mojang.serialization.Codec<Component> createCodec(com.mojang.serialization.Codec<Component> codec) private static MutableComponentcreateFromList(List<Component> components) static <T> com.mojang.serialization.MapCodec<T> createLegacyComponentMatcher(ExtraCodecs.LateBoundIdMapper<String, com.mojang.serialization.MapCodec<? extends T>> mapper, Function<T, com.mojang.serialization.MapCodec<? extends T>> encoderGetter, String fieldName) static com.mojang.serialization.Codec<Component> flatRestrictedCodec(int maxSize)
-
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>> mapper, Function<T, com.mojang.serialization.MapCodec<? extends T>> encoderGetter, String fieldName) -
createCodec
-
bootstrap
private static void bootstrap(ExtraCodecs.LateBoundIdMapper<String, com.mojang.serialization.MapCodec<? extends ComponentContents>> mapper)
-