Skip to content

ComponentModule

Kapitencraft edited this page Jun 24, 2026 · 1 revision

this module extends components (Vanilla's system to format chat) by giving mod devs the possibility of adding custom component types and providing some by itself

Adding custom Component Types

hook to the ./event/custom/RegisterComponentTypesEvent and register a custom type this way. each type is combined with a custom ComponentContents class which provides the actual characters and the style (formatting). each type must declare a MapCodec to serialize the component contents to json and a string as the name.

Glyph Effects

glyph effects are custom effects that are applied to each character of text to be rendered individually.
adding custom effects can be done via the RegisterGlyphEffectsEvent and its #register method

Player Head Component

this module adds PlayerHead ComponentContents that can be used to display player heads in chat or other messages. by default the heads will show up next to the players name in chat and over the head. access the Player Head Component via ./ExtraComponents#playerHead. the required UUID is the profile UUID of the player you wish to create a head component for.

Clone this wiki locally