-
[1.11.2] Create Fog
Weird. Do you know if there is any other way to create fog?
-
[1.11.2] Create Fog
-
[1.11.2] Create Fog
@SideOnly(Side.CLIENT) @SubscribeEvent public void onFogDensityRender(EntityViewRenderEvent.FogDensity event){ event.setDensity(Constants.fogDensity); event.setCanceled(true); } @SideOnly(Side.CLIENT) @SubscribeEvent public void onFogColorRender(EntityViewRenderEvent.FogColors event){ event.setRed((float) Constants.fogColor.getRed() / 255); event.setGreen((float) Constants.fogColor.getGreen() / 255); event.setBlue((float) Constants.fogColor.getBlue() / 255); } EDIT: Another Edit. So if I increase the fog density, everything works good again and I see fog. However, if the fog density is 0, i get that weird bar on the sky which is colored like the fog. Do you know how to fix that?
-
[1.11.2] Create Fog
I'll try that. I edited my post above to show you how the fog looks EDIT: Didn't work, result still the same as above.
-
[1.11.2] Create Fog
The event.setCanceled(); was a typo mistake on this forum (the code does not have this mistake). (it says canceled in the code) Constants.fogColor is a ljwgl color which stores the red/green/blue as ints as values 0-255 I just realized my mistake. I divide the 255 by the value, not the value by 255. And I am in maths AP. Oops. I'll try that. EDIT: just realized that FogColor() is not cancelable. Also, this is what the fog looks like on my screen:
-
[1.11.2] Create Fog
I implemented them like this: @SideOnly(Side.CLIENT) @SubscribeEvent public void onFogDensityRender(EntityViewRenderEvent.FogDensity event){ event.setDensity(Constants.fogDensity); event.setCanceled(true); } @SideOnly(Side.CLIENT) @SubscribeEvent public void onFogColorRender(EntityViewRenderEvent.FogColors event){ event.setRed(255 / Constants.fogColor.getRed()); event.setGreen(255 / Constants.fogColor.getGreen()); event.setBlue(255 / Constants.fogColor.getBlue()); event.setCancaled(true); }
-
[Help] Changing sky color not working.
I know that er.setupFog() is private, was that replaced by updateFogColor()?
-
[1.11.2] Create Fog
So I am creating a Mod that acts similar to weather2 by Corosus and the thing I ask for is the following: When underneath a storm, I want the player to experience fog. I have no idea how to to this (I tried the EntityViewRenderEvent.FogDensity / FogColor, this just makes the sky appear black and white). the method EntityRender.setupFog() method is private so I cannot use that. Anybody knows how to setup fog (preferrably with color)?
-
[1.7.10] Unable to get FogDensity working.
EntityRenderer#setupFog() is private in 1.11.2
-
[Help] Changing sky color not working.
Bump, this would be interesting to know, also for newer versions.
-
How to create a custom .dat file and write custom NBT Tag Compounds to it
The link you sent 404s on my machine
-
Difference between WorldServer and World
If I do something on the World class, does that automatically update the Client?
-
Difference between WorldServer and World
Hey! For the mod I am creating I need to get the World (in particular, the overworld) and I stumbled across this thing that FMLServerStartingEvent.getServer().worldServerForDimension(0) gives me a "WorldServer" type object, however I pass this world to another function that only takes "World" type objects. Eclipse doesn't give me a error on that, so I am not sure wether I am doing things correctly. Can anybody explain me the difference or if I'm wrong, what is the proper way to get the overworld? Thanks in Advance, MrObsidy24
-
playerLoggedInEvent not firing
Works. I was just being dumb.
-
playerLoggedInEvent not firing
Fail. My bad. Sorry, I just recently got into modding (hence the "Joined 22 Minutes ago") I'll try that!
IPS spam blocked by CleanTalk.