Jump to content

[1.19.2] How to hide or make transparent vanilla blocks?


SoLegendary

Recommended Posts

For some context, since this sounds like something trying to make a cheat mod would be doing, I have a mod that has you play Minecraft in a top-down perspective controlling mobs as units in a strategy game.

https://www.youtube.com/watch?v=2kL4vyjE2Mc

One issue I have right now is that forests are very difficult to move through because you can't easily see your mobs through leaves.

To combat this, I want to be able to make these vanilla leaf blocks either completely hidden or transparent at specific locations (I know where all of the required BlockPoses will be to do this). Ideally I would like them to be transparent, but if they their rendering can be cancelled entirely, I can also render blocks which are partially transparent (eg. glass) in their place to achieve the same effect.

Another idea I had was to have all vanilla leaf blocks replaced by some equivalent custom block that I have control over, but that would be a lot of work and I wanted to know if I could do it without that first before attempting it.

Edited by SoLegendary
formatting
Link to comment
Share on other sites

Ok actually nevermind, I found I can cancel BlockRenderDispatcher.renderBatched with a mixin to hide the blocks entirely.

If there a way to do the transparency route though I would still like to know as that will mean I can retain the leaf texture instead of having to use some other transparent block.

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.