Jump to content

Custom breaking overlay


tebreca

Recommended Posts

Hello there,

 

So I've made this tool which "melts" down blocks. To make it look like it is actually melting it I have made a custom texture for the breaking overlay.

Does anyone know if there is any way I can add a custom breaking overlay?

I've stumbled across IBlockState::hasCustomBreakingProgress but I couldn't find anything about that either.

I'm guessing that's something else than what I'm looking for?

 

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

There is no way to set a custom texture for the breaking progress, it is hardcoded in RenderGlobal#drawBlockDamageTexture.

If your block has a tile entity and custom TESR and you return true from both TileEntity#canRenderBreaking and Block#hasCustomBreakingProgress then your TESR can render the breaking texture, look at the vanilla chest for an example of that.

For blocks that do not have a TESR this is not possible.

Ah, I hate hardcoded things, is there a reason for the hard coding or is it safe for me to use asm on it

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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