Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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.

  • 2 months later...
  • Author

Sorry for bumping this, just hoping that someone might have an idea for the right way to do this. Perhaps Forge needs an additional hook?

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.