Interface TooltipComponentCallback


@Deprecated public interface TooltipComponentCallback
Deprecated.
Use Quilt Tooltip API's TooltipComponentCallback instead.
Allows registering a mapping from TooltipData to TooltipComponent. This allows custom tooltips for items: first, override Item.getTooltipData(net.minecraft.item.ItemStack) and return a custom TooltipData. Second, register a listener to this event and convert the data to your component implementation if it's an instance of your data class.

Note that failure to map some data to a component will throw an exception, so make sure that any data you return in Item.getTooltipData(net.minecraft.item.ItemStack) will be handled by one of the callbacks.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Return the tooltip component for the passed data, or null if none is available.