Jump to content

Recommended Posts

Posted

Hi, I am trying to create a custom

ItemStackTileEntityRenderer

For an Item, to render a custom durability bar.

I have looked through vanilla code and tried to implement this with a 

ItemStackTileEntityRenderer

But so far have had 0 luck.

If I try to use

ItemRenderer.render()

It crashes because it ends up endlessly looping.

My custom method to draw the bar is also not working.

CosmosEnergyItemItemStackRenderer.java

  Reveal hidden contents


CosmosItemRenderer.java

  Reveal hidden contents


I am really not sure how to handle this. The item does not render in any state currently, it is invisible. I had to use

"parent": "builtin/entity"

inside the Item.json to allow the ISTER to even work. I know this is probably an atrocious attempt, but I have been toying with this for 3 hours now and still nothing.

Any help or advice is appreciated.

Posted

why can't you use the vanilla durability bar?

oh and btw, don't use @OnlyIn, and please post code using the code tool that the forum provides

so that we can actually read the code without struggling

 

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.