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.

Featured Replies

  • Author

Did you mean Show or Whow?

Heres my code:

Spoiler

@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
public static void onFogDensityEvent(EntityViewRenderEvent.FogDensity event) {
    if (event.getEntity().isInsideOfMaterial(ModMaterials.MOLTEN_GLASS)) {
        GlStateManager.setFog(EXP);
        event.setDensity(2F);
    }
    else {
        GlStateManager.setFog(LINEAR);
        event.setDensity(0.01F);
    }
}

@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
public static void onFogColorsEvent(EntityViewRenderEvent.FogColors event) {
    if (event.getEntity().isInsideOfMaterial(ModMaterials.MOLTEN_GLASS)) {
        event.setRed(COLOR_MOLTEN_GLASS.getRed() / 255F);
        event.setGreen(COLOR_MOLTEN_GLASS.getGreen() / 255F);
        event.setBlue(COLOR_MOLTEN_GLASS.getBlue() / 255F);
    }
}

 

I meant show, sorry.

Read the docs on the FogDensity event:

/**
     * Event that allows any feature to customize the fog density the player sees.
     * NOTE: In order to make this event have an effect, you must cancel the event
     */

 

  • Author

Oops i accidently removed that while adjusting.

Now when i get out of the fluid i cant see anything.

I already set the fog density to be small when not in the liquid.

Spoiler

2019-05-11_09_17_14.png.6100ae1f8ec7d2fe0d0aa3123f7de860.png2019-05-11_09_16_11.png.ee2825db3cda361b2670119c7540ba68.png

Spoiler

@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
public static void onFogDensityEvent(EntityViewRenderEvent.FogDensity event) {
    if (event.getEntity().isInsideOfMaterial(ModMaterials.MOLTEN_GLASS)) {
        GlStateManager.setFog(EXP);
        event.setDensity(2F);
    }
    else {
        GlStateManager.setFog(LINEAR);
        event.setDensity(0.01F);
    }
    event.setCanceled(true);
}

@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
public static void onFogColorsEvent(EntityViewRenderEvent.FogColors event) {
    if (event.getEntity().isInsideOfMaterial(ModMaterials.MOLTEN_GLASS)) {
        event.setRed(COLOR_MOLTEN_GLASS.getRed() / 255F);
        event.setGreen(COLOR_MOLTEN_GLASS.getGreen() / 255F);
        event.setBlue(COLOR_MOLTEN_GLASS.getBlue() / 255F);
    }
}

 

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.