Package foundry.veil.api.client.tooltip
Interface Tooltippable
- All Known Implementing Classes:
BlockEntityMixin
Deprecated.
Use component instead
Interface for components that can have a tooltip displayed when hovered over in-world
- Since:
- 1.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTooltip(String tooltip) Deprecated.Add a tooltip component to the block entityvoidaddTooltip(List<net.minecraft.network.chat.Component> tooltip) Deprecated.Add a list of tooltip components to the block entityvoidaddTooltip(net.minecraft.network.chat.Component tooltip) Deprecated.Add a tooltip component to the block entitygetItems()Deprecated.Get the items to render in the tooltip and data about themnet.minecraft.world.item.ItemStackgetStack()Deprecated.The stack for the tooltip to take components fromgetTheme()Deprecated.Get the theme object for the tooltip from the block entityDeprecated.Obtain the timeline for the tooltipList<net.minecraft.network.chat.Component> Deprecated.Get the tooltip components from the block entityintDeprecated.Increase the tooltip heightintDeprecated.Increase the tooltip widthintDeprecated.Get the x offset for the tooltipintDeprecated.Get the y offset for the tooltipbooleanDeprecated.Whether the tooltip should be rendered in worldspace or notbooleanDeprecated.voidloadTooltipData(net.minecraft.nbt.CompoundTag tag) Deprecated.net.minecraft.nbt.CompoundTagDeprecated.voidsetBackgroundColor(int color) Deprecated.Set the background color of the themevoidsetBottomBorderColor(int color) Deprecated.Set the bottom border color of the themevoidsetTheme(ColorTheme theme) Deprecated.Set the theme object for the tooltip from the block entityvoidsetTooltip(List<net.minecraft.network.chat.Component> tooltip) Deprecated.Set the tooltip components for the block entityvoidsetTopBorderColor(int color) Deprecated.Set the top border color of the theme
-
Method Details
-
getTooltip
List<net.minecraft.network.chat.Component> getTooltip()Deprecated.Get the tooltip components from the block entity- Returns:
- the tooltip components
-
isTooltipEnabled
boolean isTooltipEnabled()Deprecated. -
saveTooltipData
net.minecraft.nbt.CompoundTag saveTooltipData()Deprecated. -
loadTooltipData
void loadTooltipData(net.minecraft.nbt.CompoundTag tag) Deprecated. -
setTooltip
Deprecated.Set the tooltip components for the block entity- Parameters:
tooltip- the tooltip components to set
-
addTooltip
void addTooltip(net.minecraft.network.chat.Component tooltip) Deprecated.Add a tooltip component to the block entity- Parameters:
tooltip-
-
addTooltip
Deprecated.Add a list of tooltip components to the block entity- Parameters:
tooltip-
-
addTooltip
Deprecated.Add a tooltip component to the block entity- Parameters:
tooltip-
-
getTheme
ColorTheme getTheme()Deprecated.Get the theme object for the tooltip from the block entity- Returns:
- the theme object
- See Also:
-
setTheme
Deprecated.Set the theme object for the tooltip from the block entity- Parameters:
theme- the theme object to set
-
setBackgroundColor
void setBackgroundColor(int color) Deprecated.Set the background color of the theme- Parameters:
color- the color to set
-
setTopBorderColor
void setTopBorderColor(int color) Deprecated.Set the top border color of the theme- Parameters:
color-
-
setBottomBorderColor
void setBottomBorderColor(int color) Deprecated.Set the bottom border color of the theme- Parameters:
color-
-
getWorldspace
boolean getWorldspace()Deprecated.Whether the tooltip should be rendered in worldspace or not- Returns:
- true if the tooltip should be rendered in worldspace, false if it should be rendered in screenspace
-
getTimeline
TooltipTimeline getTimeline()Deprecated.Obtain the timeline for the tooltip- Returns:
- the timeline
-
getStack
net.minecraft.world.item.ItemStack getStack()Deprecated.The stack for the tooltip to take components from- Returns:
- the stack
-
getTooltipWidth
int getTooltipWidth()Deprecated.Increase the tooltip width- Returns:
- the bonus width
-
getTooltipHeight
int getTooltipHeight()Deprecated.Increase the tooltip height- Returns:
- the bonus height
-
getTooltipXOffset
int getTooltipXOffset()Deprecated.Get the x offset for the tooltip- Returns:
-
getTooltipYOffset
int getTooltipYOffset()Deprecated.Get the y offset for the tooltip- Returns:
-
getItems
List<VeilUIItemTooltipDataHolder> getItems()Deprecated.Get the items to render in the tooltip and data about them- Returns:
- the items
-