Package net.minecraft.network.chat
Class ComponentUtils
java.lang.Object
net.minecraft.network.chat.ComponentUtils
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic MutableComponentcopyOnClickText(String p_260039_) static <T extends Comparable<T>>
ComponentformatAndSortList(Collection<T> p_130746_, Function<T, Component> p_130747_) static ComponentformatList(Collection<? extends Component> p_178434_, Component p_178435_) static <T> ComponentformatList(Collection<? extends T> p_178441_, Function<T, Component> p_178442_) static <T> MutableComponentformatList(Collection<? extends T> p_178430_, Optional<? extends Component> p_178431_, Function<T, Component> p_178432_) static <T> MutableComponentformatList(Collection<? extends T> p_178437_, Component p_178438_, Function<T, Component> p_178439_) static ComponentformatList(Collection<String> p_130744_) static ComponentfromMessage(com.mojang.brigadier.Message p_130730_) static booleanisTranslationResolvable(Component p_237135_) static MutableComponentmergeStyles(MutableComponent p_130751_, Style p_130752_) private static StyleresolveStyle(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 MutableComponentupdateForEntity(CommandSourceStack p_130732_, Component p_130733_, Entity p_130734_, int p_130735_) static MutableComponentwrapInSquareBrackets(Component p_130749_)  
- 
Field Details
- 
DEFAULT_SEPARATOR_TEXT
- See Also:
 
 - 
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
 - 
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
 - 
isTranslationResolvable
 - 
copyOnClickText
 
 -