Posted February 17, 20196 yr I want to change the fog of the game and the FogColors event works fine but the FogDensity event is not working for me. When i cancel the event and set the fog density to any value there is no fog at all. And when i don't cancel the event the fog density value isn't changing anything. thats my code: @SubscribeEvent public static void renderfog2(EntityViewRenderEvent.FogDensity event) { if (event.getEntity().isInsideOfMaterial(Material.WATER)) { event.setDensity(0.6f); event.setCanceled(true); } } Edited July 15, 20196 yr by Meldexun
February 18, 20196 yr Author So instead of setting the density with the event i now use GL11.glFogf(GL11.GL_FOG_DENSITY, 0.025f + 0.0025f * blocksUnderWater(event.getEntity())); If i'm missing something please tell me.
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.