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

public class WrappedComponent extends Object implements net.minecraft.network.chat.Component
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.network.chat.Component

    net.minecraft.network.chat.Component.Serializer

    Nested classes/interfaces inherited from interface net.minecraft.network.chat.FormattedText

    net.minecraft.network.chat.FormattedText.ContentConsumer<T extends Object>, net.minecraft.network.chat.FormattedText.StyledContentConsumer<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected net.minecraft.network.chat.Component
     
    protected @Nullable Object
     

    Fields inherited from interface net.minecraft.network.chat.FormattedText

    EMPTY, STOP_ITERATION
  • Constructor Summary

    Constructors
    Constructor
    Description
    WrappedComponent(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 Type
    Method
    Description
    @NotNull net.kyori.adventure.text.Component
     
    net.minecraft.network.chat.MutableComponent
     
    net.minecraft.network.chat.Component
     
    @Nullable net.minecraft.network.chat.Component
     
    protected net.minecraft.network.chat.Component
     
    net.minecraft.network.chat.ComponentContents
     
    List<net.minecraft.network.chat.Component>
     
     
    getString(int length)
     
    net.minecraft.network.chat.Style
     
    net.minecraft.util.FormattedCharSequence
     
    @Nullable Function<net.kyori.adventure.pointer.Pointered,?>
    Partition to use to generate cache keys.
    net.minecraft.network.chat.MutableComponent
     
    rendered(net.kyori.adventure.pointer.Pointered ptr)
     
    @Nullable net.kyori.adventure.text.renderer.ComponentRenderer<net.kyori.adventure.pointer.Pointered>
    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.Component
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.network.chat.Component

    contains, toFlatList, toFlatList
  • Field Details

    • converted

      protected net.minecraft.network.chat.Component converted
    • deepConvertedLocalized

      @Nullable protected @Nullable Object 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

      @Nullable public @Nullable Function<net.kyori.adventure.pointer.Pointered,?> partition()
      Partition to use to generate cache keys.
      Returns:
      the partition, if any
    • wrapped

      public net.kyori.adventure.text.Component wrapped()
    • rendered

      public WrappedComponent rendered(net.kyori.adventure.pointer.Pointered ptr)
    • 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:
      getStyle in interface net.minecraft.network.chat.Component
    • getString

      public String getString()
      Specified by:
      getString in interface net.minecraft.network.chat.Component
      Specified by:
      getString in interface net.minecraft.network.chat.FormattedText
      Specified by:
      getString in interface com.mojang.brigadier.Message
    • getString

      public String getString(int length)
      Specified by:
      getString in interface net.minecraft.network.chat.Component
    • getContents

      public net.minecraft.network.chat.ComponentContents getContents()
      Specified by:
      getContents in interface net.minecraft.network.chat.Component
    • getSiblings

      public List<net.minecraft.network.chat.Component> getSiblings()
      Specified by:
      getSiblings in interface net.minecraft.network.chat.Component
    • plainCopy

      public net.minecraft.network.chat.MutableComponent plainCopy()
      Specified by:
      plainCopy in interface net.minecraft.network.chat.Component
    • copy

      public net.minecraft.network.chat.MutableComponent copy()
      Specified by:
      copy in interface net.minecraft.network.chat.Component
    • getVisualOrderText

      public net.minecraft.util.FormattedCharSequence getVisualOrderText()
      Specified by:
      getVisualOrderText in interface net.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:
      visit in interface net.minecraft.network.chat.Component
      Specified by:
      visit in interface net.minecraft.network.chat.FormattedText
    • visit

      public <T> Optional<T> visit(net.minecraft.network.chat.FormattedText.ContentConsumer<T> visitor)
      Specified by:
      visit in interface net.minecraft.network.chat.Component
      Specified by:
      visit in interface net.minecraft.network.chat.FormattedText
    • asComponent

      public @NotNull net.kyori.adventure.text.Component asComponent()
      Specified by:
      asComponent in interface net.kyori.adventure.text.ComponentLike