All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Resource Bar API

Resource Bar API

by TheRedBrain • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Resource Bar API

A small java API mod that allows mods to easily set up a complete resource bar HUD element.

This can be for example a mana bar.

This API does not do all the work. All this API does is provide a method that draws the HUD element according to the given parameters.

It does not decide under which conditions the element should be rendered. That is the job of the mod using this API. This decision was made to ensure maximum flexibility when using this API.

How to Install Resource Bar API (Mod)

Resource Bar API by TheRedBrain is verified for Fabric across Minecraft versions 1.20.1, 1.21.1, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2 (latest release: 4.0.0, file size: 51 KB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.20.1, 1.21.1, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2) and platform (Fabric).
  2. Make sure you have the compatible loader or environment installed for Fabric.
  3. Move the downloaded Resource Bar API file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.1.x
Fabric
7mo ago 1
1.21.11
Fabric
8mo ago 1
1.21.11
Fabric
9mo ago 1
1.21.10
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
1.21.1
Fabric
last yr. 1
1.20.1
Fabric
last yr. 1
[4.0.0] 4.0.0 by TheRedBrain on Apr 15, 2026
Download
# 4.0.0

  • updated to Minecraft 26.1.x
  • removed deprecated "icon resource bar" API method

[3.2.0] 3.2.0 by TheRedBrain on Feb 17, 2026
Download
# 3.2.0

## Changes

  • reworked icon resource bars to support multiple icon types per resource bar
  • the old API method was deprecated

[3.1.0] 3.1.0 by TheRedBrain on Jan 25, 2026
Download
# 3.1.0

  • updated to 1.21.11
  • migrated to Mojang Mappings

[3.0.0] 3.0.0 by TheRedBrain on Oct 25, 2025
Download
# 3.0.0

  • updated to 1.21.10

[2.7.0] 2.7.0 by TheRedBrain on Jul 30, 2025
Download
# 2.7.0

  • added icon resource bars, similar to the vanilla resource bars. This first iteration does not support multiple icon types per bar yet (eg absorption hearts). This will (hopefully) be implemented at a later stage.
  • several API methods were renamed and split up

[1.6.2] 1.6.2 by TheRedBrain on Dec 08, 2024
Download
# 1.6.2

  • fixed some other wrong calculations

[2.6.2] 2.6.2 by TheRedBrain on Dec 08, 2024
Download
# 2.6.2

  • fixed some other wrong calculations

[1.6.1] 1.6.1 by TheRedBrain on Dec 08, 2024
Download
# 1.6.1

  • fixed some wrong calculations

[2.6.1] 2.6.1 by TheRedBrain on Dec 08, 2024
Download
# 2.6.1

  • fixed some wrong calculations

[2.6.0] 2.6.0 by TheRedBrain on Dec 08, 2024
Download
# 2.6.0

This is a pretty fundamental rewrite. The initial idea of splitting a bar into three textures per "layer" to allow for easy change of the bar length, came with the cost of massive FPS drops.
With this rewrite the bar size is no longer changeable with a simple config option. Each 'layer' consists of only 1 texture (which can have configurable dimensions).
In addition, the texture can be dynamically replaced by another texture (with configurable dimensions) depending on the max value.
The result of the rewrite is a much, MUCH more optimised API.
  • removed 'is_centered' option, as it was redundant and unnecessarily complicated the calculations.
  • 'fill_direction' no longer chooses between a horizontal and a vertical 'texture set', it only determines the direction from which the bar is filled. This means that changing between horizontal and vertical resource bars also requires a texture change.
  • added the option to display an icon (with configurable texture id and dimensions). This can be toggled independently of the bar and the number.
  • added a server config option to enable debug logs

[1.6.0] 1.6.0 by TheRedBrain on Dec 08, 2024
Download
# 1.6.0

This is a pretty fundamental rewrite. The initial idea of splitting a bar into three textures per "layer" to allow for easy change of the bar length, came with the cost of massive FPS drops.
With this rewrite the bar size is no longer changeable with a simple config option. Each 'layer' consists of only 1 texture (which can have configurable dimensions).
In addition, the texture can be dynamically replaced by another texture (with configurable dimensions) depending on the max value.
The result of the rewrite is a much, MUCH more optimised API.
  • removed 'is_centered' option, as it was redundant and unnecessarily complicated the calculations.
  • 'fill_direction' no longer chooses between a horizontal and a vertical 'texture set', it only determines the direction from which the bar is filled. This means that changing between horizontal and vertical resource bars also requires a texture change.
  • added the option to display an icon (with configurable texture id and dimensions). This can be toggled independently of the bar and the number.
  • added a server config option to enable debug logs

[1.5.0] 1.5.0 by TheRedBrain on Dec 06, 2024
Download
# 1.5.0

  • added API method for clearing the resource bar value cache of a given resource bar
  • resource number rendering is now independent of the resource bar

[2.5.0] 2.5.0 by TheRedBrain on Dec 06, 2024
Download
# 2.5.0

  • added API method for clearing the resource bar value cache of a given resource bar
  • resource number rendering is now independent of the resource bar

[1.4.1] 1.4.1 by TheRedBrain on Dec 03, 2024
Download
# 1.4.1

  • fixed reserved value display

[2.4.1] 2.4.1 by TheRedBrain on Dec 03, 2024
Download
# 2.4.1

  • fixed reserved value display

Resource Bar API Icon
Download Resource Bar API
Select game version
Select platform