Class WrappedComponent
java.lang.Object
net.kyori.adventure.platform.fabric.impl.WrappedComponent
- All Implemented Interfaces:
com.mojang.brigadier.Message,net.kyori.adventure.text.ComponentLike,net.minecraft.network.chat.Component,net.minecraft.network.chat.FormattedText
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.chat.Component
net.minecraft.network.chat.Component.Serializer -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.network.chat.Componentprotected @Nullable ObjectFields inherited from interface net.minecraft.network.chat.FormattedText
EMPTY, STOP_ITERATION -
Constructor Summary
ConstructorsConstructorDescriptionWrappedComponent(net.kyori.adventure.text.Component wrapped, @Nullable Function<net.kyori.adventure.pointer.Pointered, ?> partition, @Nullable net.kyori.adventure.text.renderer.ComponentRenderer<net.kyori.adventure.pointer.Pointered> renderer) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.text.Componentnet.minecraft.network.chat.MutableComponentcopy()net.minecraft.network.chat.Component@Nullable net.minecraft.network.chat.Componentprotected net.minecraft.network.chat.Componentnet.minecraft.network.chat.ComponentContentsList<net.minecraft.network.chat.Component>getString(int length) net.minecraft.network.chat.StylegetStyle()net.minecraft.util.FormattedCharSequence@Nullable Function<net.kyori.adventure.pointer.Pointered,?> Partition to use to generate cache keys.net.minecraft.network.chat.MutableComponentrendered(net.kyori.adventure.pointer.Pointered ptr) @Nullable net.kyori.adventure.text.renderer.ComponentRenderer<net.kyori.adventure.pointer.Pointered>renderer()Renderer to use to translate messages.<T> Optional<T>visit(net.minecraft.network.chat.FormattedText.ContentConsumer<T> visitor) <T> Optional<T>visit(net.minecraft.network.chat.FormattedText.StyledContentConsumer<T> visitor, net.minecraft.network.chat.Style style) net.kyori.adventure.text.Componentwrapped()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.chat.Component
contains, toFlatList, toFlatList
-
Field Details
-
converted
protected net.minecraft.network.chat.Component converted -
deepConvertedLocalized
-
-
Constructor Details
-
WrappedComponent
public WrappedComponent(net.kyori.adventure.text.Component wrapped, @Nullable @Nullable Function<net.kyori.adventure.pointer.Pointered, ?> partition, @Nullable @Nullable net.kyori.adventure.text.renderer.ComponentRenderer<net.kyori.adventure.pointer.Pointered> renderer)
-
-
Method Details
-
renderer
@Nullable public @Nullable net.kyori.adventure.text.renderer.ComponentRenderer<net.kyori.adventure.pointer.Pointered> renderer()Renderer to use to translate messages.- Returns:
- the renderer, if any
-
partition
Partition to use to generate cache keys.- Returns:
- the partition, if any
-
wrapped
public net.kyori.adventure.text.Component wrapped() -
rendered
-
deepConverted
public net.minecraft.network.chat.Component deepConverted() -
deepConvertedLocalized
@OverrideOnly protected net.minecraft.network.chat.Component deepConvertedLocalized() -
deepConvertedIfPresent
@Nullable public @Nullable net.minecraft.network.chat.Component deepConvertedIfPresent() -
getStyle
public net.minecraft.network.chat.Style getStyle()- Specified by:
getStylein interfacenet.minecraft.network.chat.Component
-
getString
- Specified by:
getStringin interfacenet.minecraft.network.chat.Component- Specified by:
getStringin interfacenet.minecraft.network.chat.FormattedText- Specified by:
getStringin interfacecom.mojang.brigadier.Message
-
getString
- Specified by:
getStringin interfacenet.minecraft.network.chat.Component
-
getContents
public net.minecraft.network.chat.ComponentContents getContents()- Specified by:
getContentsin interfacenet.minecraft.network.chat.Component
-
getSiblings
- Specified by:
getSiblingsin interfacenet.minecraft.network.chat.Component
-
plainCopy
public net.minecraft.network.chat.MutableComponent plainCopy()- Specified by:
plainCopyin interfacenet.minecraft.network.chat.Component
-
copy
public net.minecraft.network.chat.MutableComponent copy()- Specified by:
copyin interfacenet.minecraft.network.chat.Component
-
getVisualOrderText
public net.minecraft.util.FormattedCharSequence getVisualOrderText()- Specified by:
getVisualOrderTextin interfacenet.minecraft.network.chat.Component
-
visit
public <T> Optional<T> visit(net.minecraft.network.chat.FormattedText.StyledContentConsumer<T> visitor, net.minecraft.network.chat.Style style) - Specified by:
visitin interfacenet.minecraft.network.chat.Component- Specified by:
visitin interfacenet.minecraft.network.chat.FormattedText
-
visit
- Specified by:
visitin interfacenet.minecraft.network.chat.Component- Specified by:
visitin interfacenet.minecraft.network.chat.FormattedText
-
asComponent
public @NotNull net.kyori.adventure.text.Component asComponent()- Specified by:
asComponentin interfacenet.kyori.adventure.text.ComponentLike
-