Jump to content

[1.17.1] Event to draw in the world before translucent rendering


Recommended Posts

Hi. I am drawing a series of lines in the world and everything is going well except the lines are not visible when they intersect water (as with solid blocks)

I have the following code:

public static void drawLast(RenderWorldLastEvent event) {
    renderMyLines(event.getMatrixStack()); // Draws lines perfectly except when they are underwater (and I'm not)

public static void drawSelection(DrawSelectionEvent event) {
    renderMyLines(event.getMatrix()); // Draws lines perfectly, even going underwater - BUT! ONLY when I'm looking at a block!

Is there an event I can use to render my lines such that they will be drawn correctly, even underwater and regardless of what I'm looking at?
I've searched through the code for forge hooks/events (especially LevelRenderer.renderLevel() where these events are triggered) but can't seem to find anything close to the above.

Many thanks.

Link to comment
Share on other sites

  • 2 months later...

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.

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.