Skip to content

InWorldTooltips

birsy edited this page Apr 6, 2024 · 3 revisions

Veil provides a way to allocate an entity or block entity as Tooltippable by implementing the interface, which when looked at by the player, renders a tooltip on the screen or in-world. Tooltips are able to be defined server-side, but are client-prioritized, meaning client-sided changes will be what is displayed in the end.

If other mods alter tooltips in any way, this should be fully compatible with how Veil's tooltips are rendered.

Properties

Veil's tooltip displays have a few properties to help make the visuals of them much more appealing and unique.

Component List

The list of components is the actual contents of the tooltip, i.e the text to display. This is fully customizable as a normal vanilla Component.

Worldspace

Worldspace tooltips are tooltips that are anchored to a position in-world - for example, a worldspace tooltip on a blockentity will anchor itself to the closest corner of the block to the player, and rotate around that to face the player. For entities, it will just use their position. This has issues with entities larger than 1 block wide.

Color Themes

Color Themes are another part of the Veil library. Find out more about them here.

Item Tooltip Data Holders

Item Tooltip Data Holders are objects used to store information about how to render an ItemStack inside a Veil UI tooltip - it holds an ItemStack, and 2 functions, one for the X position of the item in the tooltip, and another for the Y position. These functions pass in the partial tick value, and request a float as the return value.

Tooltip Timelines

Tooltip Timelines are a work-in-progress system used to animate tooltips - be it tooltip width, height, X/Y offset, contents, itemstack and colors. These are currently quite buggy and not ready for use.

Clone this wiki locally