Package net.minecraft.util.text
Class TextComponentUtils
- java.lang.Object
-
- net.minecraft.util.text.TextComponentUtils
-
public class TextComponentUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TextComponentUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends java.lang.Comparable<T>>
ITextComponentformatAndSortList(java.util.Collection<T> p_197675_0_, java.util.function.Function<T,ITextComponent> p_197675_1_)
static ITextComponent
formatList(java.util.Collection<java.lang.String> p_197678_0_)
static <T> IFormattableTextComponent
formatList(java.util.Collection<T> p_240649_0_, java.util.function.Function<T,ITextComponent> p_240649_1_)
static ITextComponent
fromMessage(com.mojang.brigadier.Message p_202465_0_)
static ITextComponent
getDisplayName(com.mojang.authlib.GameProfile p_197679_0_)
static IFormattableTextComponent
mergeStyles(IFormattableTextComponent p_240648_0_, Style p_240648_1_)
private static Style
resolveStyle(CommandSource p_240646_0_, Style p_240646_1_, Entity p_240646_2_, int p_240646_3_)
static IFormattableTextComponent
updateForEntity(CommandSource p_240645_0_, ITextComponent p_240645_1_, Entity p_240645_2_, int p_240645_3_)
static IFormattableTextComponent
wrapInSquareBrackets(ITextComponent p_240647_0_)
-
-
-
Method Detail
-
mergeStyles
public static IFormattableTextComponent mergeStyles(IFormattableTextComponent p_240648_0_, Style p_240648_1_)
-
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_)
-
formatList
public static <T> IFormattableTextComponent formatList(java.util.Collection<T> p_240649_0_, java.util.function.Function<T,ITextComponent> p_240649_1_)
-
wrapInSquareBrackets
public static IFormattableTextComponent wrapInSquareBrackets(ITextComponent p_240647_0_)
-
fromMessage
public static ITextComponent fromMessage(com.mojang.brigadier.Message p_202465_0_)
-
-