How do I make a responsive progress bar?

Started by yPeDroVisK on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a responsive progress bar?

I want to create a bar that shows the energy level inside the machine, similar to Mekanism and Tech Mods.

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I thought about doing that,…
Mon, 12/08/2025 - 01:55

I thought about doing that, but it would be a lot of work to do it with each percentage of energy. I wanted a way to render/crop the bar according to the machine's energy percentage. Like creating a variable to receive the machine's current energy value and linking an image to it; when the machine receives more energy, the image would render accordingly. I don't know if you'll understand my explanation. I'm Brazilian and I'm using a translator for this.

 

It is not a  lot of work. It…
Mon, 12/08/2025 - 15:50

It is not a  lot of work. It is single UI component and exactly how other mods do it.

You need:

  • One tiled textures with all icons
  • One GUI component: tiled image
  • One procedure to define which tile index to use