Jump to content

Recommended Posts

Posted

How does i make a battery block that have a indicator of how full is the battery and how much Energy is inputing and outputing on them? 

 

I searched for several hours and didn't find any answers how to make this. 

Posted

You won't find tutorials on adding such specific features

search and study on how Forge works with Energy

then search about dynamically rendering models

then put it all together

Posted
1 hour ago, kiou.23 said:

You won't find tutorials on adding such specific features

search and study on how Forge works with Energy

then search about dynamically rendering models

then put it all together

 

I was talking making a indicator inside a GUI, not on the block texture, and i didn't found tutorials for implement energy I/O on the block that was to be the battery. 

Posted
1 hour ago, Eduardu44 said:

 

I was talking making a indicator inside a GUI, not on the block texture, and i didn't found tutorials for implement energy I/O on the block that was to be the battery. 

I think you can do that with capabilities if I'm not mistaken, Forge provides an EnergyCapability even

and for the indicator you can do that in the render method in your container screen class

Posted

There is a thing called TileEntityRenderer (TER), that renders tile entities besides the block, so like, you would have the block model with empty spaces and the TER would render another model in that empty spaces. Read the documentation on it, https://mcforge.readthedocs.io/en/1.16.x/tileentities/tesr/, it's somewhat vague, but check other mods that uses it, probably you are gonna also want to search for TESR, which was how this was previously called, but the render method changed, so you have to know how to render stuff. Read this as well, https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e, although it's about porting from earlier version, this guide talks about how stuff is rendered now in 1.15+.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.