Interface Tooltippable

All Known Implementing Classes:
BlockEntityMixin

@Deprecated public interface Tooltippable
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 Type
    Method
    Description
    void
    addTooltip(String tooltip)
    Deprecated.
    Add a tooltip component to the block entity
    void
    addTooltip(List<net.minecraft.network.chat.Component> tooltip)
    Deprecated.
    Add a list of tooltip components to the block entity
    void
    addTooltip(net.minecraft.network.chat.Component tooltip)
    Deprecated.
    Add a tooltip component to the block entity
    Deprecated.
    Get the items to render in the tooltip and data about them
    net.minecraft.world.item.ItemStack
    Deprecated.
    The stack for the tooltip to take components from
    Deprecated.
    Get the theme object for the tooltip from the block entity
    Deprecated.
    Obtain the timeline for the tooltip
    List<net.minecraft.network.chat.Component>
    Deprecated.
    Get the tooltip components from the block entity
    int
    Deprecated.
    Increase the tooltip height
    int
    Deprecated.
    Increase the tooltip width
    int
    Deprecated.
    Get the x offset for the tooltip
    int
    Deprecated.
    Get the y offset for the tooltip
    boolean
    Deprecated.
    Whether the tooltip should be rendered in worldspace or not
    boolean
    Deprecated.
     
    void
    loadTooltipData(net.minecraft.nbt.CompoundTag tag)
    Deprecated.
     
    net.minecraft.nbt.CompoundTag
    Deprecated.
     
    void
    setBackgroundColor(int color)
    Deprecated.
    Set the background color of the theme
    void
    Deprecated.
    Set the bottom border color of the theme
    void
    Deprecated.
    Set the theme object for the tooltip from the block entity
    void
    setTooltip(List<net.minecraft.network.chat.Component> tooltip)
    Deprecated.
    Set the tooltip components for the block entity
    void
    setTopBorderColor(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

      void setTooltip(List<net.minecraft.network.chat.Component> tooltip)
      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

      void addTooltip(List<net.minecraft.network.chat.Component> tooltip)
      Deprecated.
      Add a list of tooltip components to the block entity
      Parameters:
      tooltip -
    • addTooltip

      void addTooltip(String tooltip)
      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

      void setTheme(ColorTheme theme)
      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

      Deprecated.
      Get the items to render in the tooltip and data about them
      Returns:
      the items