-
-
Notifications
You must be signed in to change notification settings - Fork 0
Utilities
Bizarre Cube edited this page Aug 14, 2026
·
2 revisions
The library includes client-side utilities that work independently of the Minecraft version.
Identifier id = Id.withDefaultNamespace("thing");
Identifier id2 = Id.fromNamespaceAndPath("mymod", "thing"); A fluent builder for Component: literal, translatable, empty, formatting
(bold, italic, underline, strikethrough, obfuscated, color, format),
as well as clickEvent, hoverEvent, insertion.
Component c = ComponentBuilder.literal("Hello")
.color(ChatFormatting.GOLD)
.bold()
.build(); ClickEvent click = ClickEventBuilder.create().copyToClipboard("text").build();
HoverEvent hover = HoverEventBuilder.create().showText("tooltip").build(); public static final KeyMapping OPEN = Keymapper.register(
"key.mymod.open",
InputConstants.KEY_H,
Keymapper.getCategoryId("misc")); Keymapper.register(...) adds the binding to a queue; the library registers it
at the appropriate loader stage (for Forge/NeoForge — via an event, for Fabric — directly).