
Tango's Dynamic Hud Lib
A small client-side Fabric library for movable HUD widgets. Provides an API that other mods can use to register HUD elements. For players, that means TangosHudLib renders and stores the widgets that another mod registers through this l
- Загрузки
- 784
- Подписчики
- 0
- Обновлён
- 24 июля 2026 г.
- Лицензия
- GPL-3.0-only
Опубликован 24 марта 2026 г.
Tango's HudLib
Tango's HudLib is a small client-side Fabric library for movable HUD widgets.
The mod itself does not add major gameplay features. It provides an API that other mods can use to register HUD elements. For players, that means TangosHudLib renders and stores the widgets that another mod registers through this library.
In-Game Usage
- Install the mod together with Fabric API.
- Start the game with a mod that registers widgets through TangosHudLib.
- Open the
Tango's HudLibcategory in the Minecraft controls menu. - Look for
HUD Editor (<Mod Name>). - Press the assigned key in-game to open that mod's HUD editor.
- Drag widgets with the left mouse button to move them.
- Close the editor with the same hotkey or with
Esc.
Widget positions are stored in config/tangos-hud-lib.json.
Using It In Your Own Mod
The smallest clean integration has two parts:
- A class with
staticmethods annotated with@HudWidget. - A registration call inside your
ClientModInitializer.
Example
package eu.example.mod;
import eu.tango.tangosHudLib.api.HudContent;
import eu.tango.tangosHudLib.api.HudLibrary;
import eu.tango.tangosHudLib.api.HudWidget;
import net.fabricmc.api.ClientModInitializer;
import net.minecraft.client.MinecraftClient;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import org.lwjgl.glfw.GLFW;
public final class ExampleModClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
HudLibrary.registerWidgets("examplemod", GLFW.GLFW_KEY_H, ExampleWidgets.class);
}
public static final class ExampleWidgets {
private ExampleWidgets() {
}
@HudWidget(id = "position")
public static HudContent position() {
MinecraftClient client = MinecraftClient.getInstance();
if (client.player == null) {
return HudContent.builder()
.line(Text.literal("Position").formatted(Formatting.GOLD))
.line(Text.literal("No world loaded").formatted(Formatting.GRAY))
.build();
}
return HudContent.builder()
.line(Text.literal("Position").formatted(Formatting.GOLD))
.line(Text.literal(
client.player.getBlockX() + " "
+ client.player.getBlockY() + " "
+ client.player.getBlockZ()
).formatted(Formatting.WHITE))
.build();
}
}
}
Rules For @HudWidget
A widget method must:
- be
static - have no parameters
- return
HudContent - use a non-empty
id
HudContent must contain at least one non-blank line:
HudContent.builder()
.line(Text.literal("Title"))
.line(Text.literal("Content"))
.build();
API Summary
HudLibrary.registerWidgets(String ownerId, int defaultKey, Class<?> clazz)registers all@HudWidgetmethods in the class and assigns a default HUD editor hotkey.HudLibrary.registerWidgets(String ownerId, Class<?> clazz)registers widgets without a default hotkey.HudLibrary.registerWidgets(Class<?> clazz)uses the library defaultstangos-hud-libandH.
Ченджлог
1.2.0+26.2Релиз26.2 · 24 июля 2026 г.
Tango's HudLib 1.2.0
Added
- Named HUD layouts can be listed, saved, loaded, deleted, exported, and imported per registering mod.
- Validated layout share codes make it possible to move layouts between installations.
- A mod-specific HUD editor can be opened from another configuration screen.
- Minecraft
26.1.xand26.2.xsupport. - Dedicated editor hotkeys for each mod that registers widgets through Tango's HudLib.
- Owner-aware widget registration so multiple mods can use the same widget ID without conflicts.
- A client-side Fabric library for defining movable HUD widgets with
@HudWidgetmethods. - Built-in drag-and-drop HUD editor with persistent widget state.
- Public registration API, development widget examples, and validation tests.
Fixed
- The HUD editor hotkey now opens and closes directly from open container screens.
Changed
- Hover a HUD in the editor and use the mouse wheel to adjust its font size from 50% to 300%.
- Font-size scaling applies to the complete widget, including its background, layout, hitbox, and drag bounds.
- The editor remains an overlay when opened from an existing screen, keeping container screens and their context HUDs active.
- HUD positions are stored per mod and widget, while existing unqualified saved widget positions remain readable.
- Ported Fabric, HUD rendering, screen, and key-mapping integration to the current Minecraft client APIs and Java 25.
1.2.0+26.1.2Релиз26.1.2 · 24 июля 2026 г.
Tango's HudLib 1.2.0
Added
- Named HUD layouts can be listed, saved, loaded, deleted, exported, and imported per registering mod.
- Validated layout share codes make it possible to move layouts between installations.
- A mod-specific HUD editor can be opened from another configuration screen.
- Minecraft
26.1.xand26.2.xsupport. - Dedicated editor hotkeys for each mod that registers widgets through Tango's HudLib.
- Owner-aware widget registration so multiple mods can use the same widget ID without conflicts.
- A client-side Fabric library for defining movable HUD widgets with
@HudWidgetmethods. - Built-in drag-and-drop HUD editor with persistent widget state.
- Public registration API, development widget examples, and validation tests.
Fixed
- The HUD editor hotkey now opens and closes directly from open container screens.
Changed
- Hover a HUD in the editor and use the mouse wheel to adjust its font size from 50% to 300%.
- Font-size scaling applies to the complete widget, including its background, layout, hitbox, and drag bounds.
- The editor remains an overlay when opened from an existing screen, keeping container screens and their context HUDs active.
- HUD positions are stored per mod and widget, while existing unqualified saved widget positions remain readable.
- Ported Fabric, HUD rendering, screen, and key-mapping integration to the current Minecraft client APIs and Java 25.
1.0.0+1.21.11Релиз1.21.11 · 24 марта 2026 г.
Tango's HudLib is a small client-side Fabric library for movable HUD widgets.
1.0.0+1.21.10Релиз1.21.10 · 24 марта 2026 г.
Tango's HudLib is a small client-side Fabric library for movable HUD widgets.
Комментарии
Загружаем…