Package net.minecraft.network.chat
Class ComponentUtils
java.lang.Object
net.minecraft.network.chat.ComponentUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
ComponentformatAndSortList(Collection<T> p_130746_, Function<T,Component> p_130747_)
static Component
formatList(Collection<? extends Component> p_178434_, Component p_178435_)
static <T> Component
formatList(Collection<? extends T> p_178441_, Function<T,Component> p_178442_)
static <T> MutableComponent
formatList(Collection<? extends T> p_178430_, Optional<? extends Component> p_178431_, Function<T,Component> p_178432_)
static <T> MutableComponent
formatList(Collection<? extends T> p_178437_, Component p_178438_, Function<T,Component> p_178439_)
static Component
formatList(Collection<String> p_130744_)
static Component
fromMessage(com.mojang.brigadier.Message p_130730_)
static Component
getDisplayName(com.mojang.authlib.GameProfile p_130728_)
static MutableComponent
mergeStyles(MutableComponent p_130751_, Style p_130752_)
private static Style
resolveStyle(CommandSourceStack p_130737_, Style p_130738_, Entity p_130739_, int p_130740_)
static Optional<MutableComponent>
updateForEntity(CommandSourceStack p_178425_, Optional<Component> p_178426_, Entity p_178427_, int p_178428_)
static MutableComponent
updateForEntity(CommandSourceStack p_130732_, Component p_130733_, Entity p_130734_, int p_130735_)
static MutableComponent
wrapInSquareBrackets(Component p_130749_)
-
Field Details
-
DEFAULT_SEPARATOR_TEXT
- See Also:
- Constant Field Values
-
DEFAULT_SEPARATOR
-
DEFAULT_NO_STYLE_SEPARATOR
-
-
Constructor Details
-
ComponentUtils
public ComponentUtils()
-
-
Method Details
-
mergeStyles
-
updateForEntity
public static Optional<MutableComponent> updateForEntity(@Nullable CommandSourceStack p_178425_, Optional<Component> p_178426_, @Nullable Entity p_178427_, int p_178428_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
updateForEntity
public static MutableComponent updateForEntity(@Nullable CommandSourceStack p_130732_, Component p_130733_, @Nullable Entity p_130734_, int p_130735_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resolveStyle
private static Style resolveStyle(@Nullable CommandSourceStack p_130737_, Style p_130738_, @Nullable Entity p_130739_, int p_130740_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getDisplayName
-
formatList
-
formatAndSortList
public static <T extends Comparable<T>> Component formatAndSortList(Collection<T> p_130746_, Function<T,Component> p_130747_) -
formatList
public static <T> Component formatList(Collection<? extends T> p_178441_, Function<T,Component> p_178442_) -
formatList
public static <T> MutableComponent formatList(Collection<? extends T> p_178430_, Optional<? extends Component> p_178431_, Function<T,Component> p_178432_) -
formatList
-
formatList
public static <T> MutableComponent formatList(Collection<? extends T> p_178437_, Component p_178438_, Function<T,Component> p_178439_) -
wrapInSquareBrackets
-
fromMessage
-