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:
- 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).
- Make sure you have the compatible loader or environment installed for Fabric.
- Move the downloaded Resource Bar API file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
|
R
4.0.0
|
7mo ago | 1 | |||
|
R
3.2.0
|
8mo ago | 1 | |||
|
R
3.1.0
|
9mo ago | 1 | |||
|
R
3.0.0
|
last yr. | 1 | |||
|
R
2.7.0
|
last yr. | 1 | |||
|
R
1.6.2
|
last yr. | 1 | |||
|
R
2.6.2
|
last yr. | 1 | |||
|
R
1.6.1
|
last yr. | 1 | |||
|
R
2.6.1
|
last yr. | 1 | |||
|
R
2.6.0
|
last yr. | 1 | |||
|
R
1.6.0
|
last yr. | 1 | |||
|
R
1.5.0
|
last yr. | 1 | |||
|
R
2.5.0
|
last yr. | 1 | |||
|
R
1.4.1
|
last yr. | 1 | |||
|
R
2.4.1
|
last yr. | 1 | |||
|
R
2.4.0
|
last yr. | 1 | |||
|
R
1.4.0
|
last yr. | 1 | |||
|
R
1.3.0
|
last yr. | 1 | |||
|
R
2.3.0
|
last yr. | 1 | |||
|
R
1.2.0
|
last yr. | 1 | |||
|
R
2.2.0
|
last yr. | 1 | |||
|
R
2.1.1
|
last yr. | 1 | |||
|
R
2.1.0
|
last yr. | 1 | |||
|
R
1.1.0
|
last yr. | 1 | |||
|
R
2.0.0
|
last yr. | 1 | |||
|
R
1.0.0
|
last yr. | 1 |
- updated to Minecraft 26.1.x
- removed deprecated "icon resource bar" API method
## Changes
- reworked icon resource bars to support multiple icon types per resource bar
- the old API method was deprecated
- updated to 1.21.11
- migrated to Mojang Mappings
- updated to 1.21.10
- 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
- fixed some other wrong calculations
- fixed some other wrong calculations
- fixed some wrong calculations
- fixed some wrong calculations
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
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
- 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
- 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
- fixed reserved value display
- fixed reserved value display