Started by
yPeDroVisK
on
Topic category: Help with Minecraft modding (Java Edition)
I want to create a bar that shows the energy level inside the machine, similar to Mekanism and Tech Mods.
Topic category: Help with Minecraft modding (Java Edition)
I want to create a bar that shows the energy level inside the machine, similar to Mekanism and Tech Mods.
Use tiled image for this, and different tiles represent different levels of the progress bar
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 is single UI component and exactly how other mods do it.
You need:
I didn't literally want to make a progress bar, I wanted a bar to store the machine's current energy. Something like Mekanism's battery.
Do you mean like a bar in the inventory icon of the item, like turning the durability bar space into a progress bar, or do you mean the big green bar with notches on the side of the image?
I mean the big green bar, but I’d also like to know about the durability bar for the progress bar, if you happen to know anything about that.