UI Timer Lib
No reviews yet
A simple UI timer for mod creators, made to be as easy to use a possible.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
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.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
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.
Features
- Display custom text on the HUD
- Show live countdown timers
- Change text and background colors easily
- Show and hide the overlay
- Lightweight and easy to integrate into other mods
Setting it up
-
Download the latest
ui-utils-<version>.jarfrom 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 (24-bit RGB hexadecimal integer)
UIUtils.setColor(int rgb);
- Set background color (24-bit RGB hexadecimal integer)
UIUtils.setBackground(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;
- Query background color
UIUtils.background;
Screenshots
Gallery
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
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
