Mod

Tango's Dynamic Hud Lib

Quick rating

Tango's Dynamic Hud Lib

No reviews yet

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

API/Library
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Unsupported

About

Project Details

Type
Mod
License
GNU General Public License v3.0 only
Latest Version
1.0.0+1.21.11
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

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

  1. Install the mod together with Fabric API.
  2. Start the game with a mod that registers widgets through TangosHudLib.
  3. Open the Tango's HudLib category in the Minecraft controls menu.
  4. Look for HUD Editor (<Mod Name>).
  5. Press the assigned key in-game to open that mod's HUD editor.
  6. Drag widgets with the left mouse button to move them.
  7. 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:

  1. A class with static methods annotated with @HudWidget.
  2. 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 @HudWidget methods 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 defaults tangos-hud-lib and H.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync