Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

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


Marshall7
 Share

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:

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

@SubscribeEvent
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

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.