Jump to content

Render enchanting glint on placed blocks?


GhostGaming

Recommended Posts

I'm currently trying to render the enchanting glint on a custom block model.

Using the different enchanting glint RenderTypes on the model obviously doesn't work because they are not of type DefaultVertexFormat.BLOCK.

Does anyone have an idea on how I would need to tackle this?

Thanks in advance!

Link to comment
Share on other sites

If you're referring to when the item is in your inventory, then you can simply use `ItemRenderer#getFoilBufferDirect` or `ItemRenderer#getFoilBuffer` if the block item is not a `HalfTransparentBlock` or `StainedGlassPaneBlock`. It's basically done by creating a `VertextMultiConsumer` of with one of the glint `RenderType`s.

If you're talking for specifically a block rendering in the world, the proper but difficult way would be to recreate the `RenderType` with the glint shader for blocks and then use a `BlockEntityRenderer` to apply it. A simple alternative would be to just create the block with the enchanting glint baked in as a texture and use the mcmeta animation to cycle between the images.

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.

Announcements



×
×
  • Create New...

Important Information

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