Class TooltipHelper
java.lang.Object
com.simibubi.create.foundation.item.TooltipHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.mojang.bridge.game.Languagestatic final Map<String,ItemDescription> static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddHint(List<net.minecraft.network.chat.Component> tooltip, String hintKey, Object... messageParams) cutString(String s, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor, int indent) Deprecated.cutString(net.minecraft.network.chat.Component s, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor) Deprecated.static List<net.minecraft.network.chat.Component>cutStringTextComponent(String c, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor) static List<net.minecraft.network.chat.Component>cutStringTextComponent(String c, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor, int indent) static List<net.minecraft.network.chat.Component>cutTextComponent(net.minecraft.network.chat.Component c, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor) static List<net.minecraft.network.chat.Component>cutTextComponent(net.minecraft.network.chat.Component c, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor, int indent) static ItemDescriptiongetTooltip(net.minecraft.world.item.ItemStack stack) static StringgetTooltipTranslationKey(net.minecraft.world.item.ItemStack stack) static booleanhasTooltip(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) static net.minecraft.network.chat.MutableComponentholdShift(ItemDescription.Palette color, boolean highlighted) static voidstatic voidreferTo(net.minecraft.world.level.ItemLike item, Supplier<? extends net.minecraft.world.level.ItemLike> itemWithTooltip)
-
Field Details
-
maxWidthPerLine
public static final int maxWidthPerLine- See Also:
-
cachedTooltips
-
cachedLanguage
public static com.mojang.bridge.game.Language cachedLanguage
-
-
Constructor Details
-
TooltipHelper
public TooltipHelper()
-
-
Method Details
-
holdShift
public static net.minecraft.network.chat.MutableComponent holdShift(ItemDescription.Palette color, boolean highlighted) -
addHint
-
referTo
public static void referTo(net.minecraft.world.level.ItemLike item, Supplier<? extends net.minecraft.world.level.ItemLike> itemWithTooltip) -
referTo
-
cutString
@Deprecated public static List<String> cutString(net.minecraft.network.chat.Component s, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor) Deprecated. -
cutString
@Deprecated public static List<String> cutString(String s, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor, int indent) Deprecated. -
cutStringTextComponent
-
cutTextComponent
public static List<net.minecraft.network.chat.Component> cutTextComponent(net.minecraft.network.chat.Component c, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor) -
cutStringTextComponent
-
cutTextComponent
public static List<net.minecraft.network.chat.Component> cutTextComponent(net.minecraft.network.chat.Component c, net.minecraft.ChatFormatting defaultColor, net.minecraft.ChatFormatting highlightColor, int indent) -
hasTooltip
public static boolean hasTooltip(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) -
getTooltip
-
getTooltipTranslationKey
-