Skip to main content
Version: 26.1.x

Tooltip Components

dev.architectury.registry.client.gui.ClientTooltipComponentRegistry

Render custom tooltip content. A TooltipComponent is the data; a ClientTooltipComponent knows how to draw it. This registry maps one to the other.

Registering a factory

ClientTooltipComponentRegistry.register(MyTooltipData.class, MyClientTooltipComponent::new);
  • The first argument is your TooltipComponent data class.
  • The second is a factory turning that data into a ClientTooltipComponent for drawing.

Register from client-side code.

note

To simply add text lines to an item tooltip, you don't need this - use ClientTooltipEvent.ITEM. This registry is for custom, drawn tooltip content (icons, bars, etc.).