类 ComponentUtils
java.lang.Object
net.minecraft.network.chat.ComponentUtils
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static MutableComponent
copyOnClickText
(String p_260039_) static <T extends Comparable<T>>
ComponentformatAndSortList
(Collection<T> pElements, Function<T, Component> pComponentExtractor) static Component
formatList
(Collection<? extends Component> pElements, Component pSeparator) static <T> Component
formatList
(Collection<? extends T> pElements, Function<T, Component> pComponentExtractor) static <T> MutableComponent
formatList
(Collection<? extends T> pElements, Optional<? extends Component> pOptionalSeparator, Function<T, Component> pComponentExtractor) static <T> MutableComponent
formatList
(Collection<? extends T> pElements, Component pSeparator, Function<T, Component> pComponentExtractor) static Component
formatList
(Collection<String> pElements) static Component
fromMessage
(com.mojang.brigadier.Message pMessage) static Component
getDisplayName
(com.mojang.authlib.GameProfile pProfile) static boolean
isTranslationResolvable
(Component pComponent) static MutableComponent
mergeStyles
(MutableComponent pComponent, Style pStyle) private static Style
resolveStyle
(CommandSourceStack pCommandSourceStack, Style pStyle, Entity pEntity, int pRecursionDepth) static Optional<MutableComponent>
updateForEntity
(CommandSourceStack pCommandSourceStack, Optional<Component> pOptionalComponent, Entity pEntity, int pRecursionDepth) static MutableComponent
updateForEntity
(CommandSourceStack pCommandSourceStack, Component pComponent, Entity pEntity, int pRecursionDepth) static MutableComponent
wrapInSquareBrackets
(Component pToWrap)
-
字段详细资料
-
DEFAULT_SEPARATOR_TEXT
- 另请参阅:
-
DEFAULT_SEPARATOR
-
DEFAULT_NO_STYLE_SEPARATOR
-
-
构造器详细资料
-
ComponentUtils
public ComponentUtils()
-
-
方法详细资料
-
mergeStyles
-
updateForEntity
public static Optional<MutableComponent> updateForEntity(@Nullable CommandSourceStack pCommandSourceStack, Optional<Component> pOptionalComponent, @Nullable Entity pEntity, int pRecursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
updateForEntity
public static MutableComponent updateForEntity(@Nullable CommandSourceStack pCommandSourceStack, Component pComponent, @Nullable Entity pEntity, int pRecursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resolveStyle
private static Style resolveStyle(@Nullable CommandSourceStack pCommandSourceStack, Style pStyle, @Nullable Entity pEntity, int pRecursionDepth) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getDisplayName
-
formatList
-
formatAndSortList
public static <T extends Comparable<T>> Component formatAndSortList(Collection<T> pElements, Function<T, Component> pComponentExtractor) -
formatList
public static <T> Component formatList(Collection<? extends T> pElements, Function<T, Component> pComponentExtractor) -
formatList
public static <T> MutableComponent formatList(Collection<? extends T> pElements, Optional<? extends Component> pOptionalSeparator, Function<T, Component> pComponentExtractor) -
formatList
-
formatList
public static <T> MutableComponent formatList(Collection<? extends T> pElements, Component pSeparator, Function<T, Component> pComponentExtractor) -
wrapInSquareBrackets
-
fromMessage
-
isTranslationResolvable
-
copyOnClickText
-