Class TextComponentUtils


  • public class TextComponentUtils
    extends java.lang.Object
    • Constructor Detail

      • TextComponentUtils

        public TextComponentUtils()
    • Method Detail

      • updateForEntity

        public static IFormattableTextComponent updateForEntity​(@Nullable
                                                                CommandSource p_240645_0_,
                                                                ITextComponent p_240645_1_,
                                                                @Nullable
                                                                Entity p_240645_2_,
                                                                int p_240645_3_)
                                                         throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • resolveStyle

        private static Style resolveStyle​(@Nullable
                                          CommandSource p_240646_0_,
                                          Style p_240646_1_,
                                          @Nullable
                                          Entity p_240646_2_,
                                          int p_240646_3_)
                                   throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • getDisplayName

        public static ITextComponent getDisplayName​(com.mojang.authlib.GameProfile p_197679_0_)
      • formatList

        public static ITextComponent formatList​(java.util.Collection<java.lang.String> p_197678_0_)
      • formatAndSortList

        public static <T extends java.lang.Comparable<T>> ITextComponent formatAndSortList​(java.util.Collection<T> p_197675_0_,
                                                                                           java.util.function.Function<T,​ITextComponent> p_197675_1_)
      • fromMessage

        public static ITextComponent fromMessage​(com.mojang.brigadier.Message p_202465_0_)