Язык

UI Timer Lib

UI Timer Lib

Modrinth

A simple UI timer for mod creators, made to be as easy to use a possible.

7 загрузок 1 подписчиков обновлено 9d ago
последняя v1.0.0 Modrinth
Fabric 1.21.6 – 1.21.11 LibraryMinigameUtility

UI Utils

UI Utils is a small Fabric library that makes it easy to display simple HUD elements without having to write your own renderer.

It is designed for mod developers who want a quick and lightweight way to show text and timers on the player's screen.

Here is an example of this library in use.

2026-06-15-11-15-40

Features

  • Display custom text on the HUD
  • Show countdown timers
  • Change text colors
  • Show and hide the overlay with a simple API
  • Lightweight and easy to integrate into other mods

Setting it up

  • Download the latest ui-utils-<version>.jar from the Versions tab.

  • Add the JAR to your project dependencies.

  • Add UI Utils as a dependency in your mod.

    fabric.mod.json

    {
      "depends": {
        "fabricloader": "*",
        "minecraft": "1.21.6",
        "ui-utils": "*"
      }
    }
    
  • Import within your Java file.

    Main.java

    import com.uitutils.UIUtils;
    

Usage

  • Show a labeled timer
UIUtils.show(String label, int seconds);
  • Hide timer
UIUtils.hide();
  • Set timer value
UIUtils.setTime(int seconds);
  • Set timer color
UIUtils.setColor(int rgb);

Internal fields

These fields exist for direct access but are not required for normal usage.

  • Query current HUD text string
UIUtils.text;
  • Query countdown value in seconds
UIUtils.secondsRemaining;
  • Query HUD visibility
UIUtils.visible;
  • Query HUD text color
UIUtils.color;

Версии

Release
1.0.0
fabric · 1.21.6, 1.21.7, 1.21.8 · 9d ago
Useful little mod library, draws a custom gui timer that you can control.
6

Комментарии 0

Пока нет комментариев. Будь первым, кто поделится мнением.

Скачать UI Timer Lib

Файлы отдаются напрямую с первоисточника. Modgrid не хранит и не изменяет их.