net.minecraftforge.client.event.EntityViewRenderEvent Java Examples

The following examples show how to use net.minecraftforge.client.event.EntityViewRenderEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GTEventEntityViewRenderEvent.java    From GT-Classic with GNU Lesser General Public License v3.0 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onRenderFog(EntityViewRenderEvent.FogDensity event) {
	if (GTConfig.general.clearerWater && event.getState().getMaterial() == Material.WATER) {
		GlStateManager.setFog(GlStateManager.FogMode.EXP);
		event.setDensity(0.025F);
		event.setCanceled(true);
	}
}
 
Example #2
Source File: AntiOverlayMod.java    From ForgeHax with MIT License 5 votes vote down vote up
/**
 * Disables water/lava fog
 */
@SubscribeEvent
public void onFogRender(EntityViewRenderEvent.FogDensity event) {
  if (event.getState().getMaterial().equals(Material.WATER)
      || event.getState().getMaterial().equals(Material.LAVA)) {
    event.setDensity(0);
    event.setCanceled(true);
  }
}
 
Example #3
Source File: AntiFogMod.java    From ForgeHax with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onFogDensity(EntityViewRenderEvent.FogDensity event) {
  event.setDensity(0);
  event.setCanceled(true);
}
 
Example #4
Source File: AntiFogMod.java    From ForgeHax with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onFogColor(EntityViewRenderEvent.FogColors event) {
  event.setRed(55);
  event.setGreen(55);
  event.setBlue(55);
}
 
Example #5
Source File: RenderUtils.java    From OpenModsLib with MIT License 4 votes vote down vote up
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onFogColor(EntityViewRenderEvent.FogColors evt) {
	fogRed = evt.getRed();
	fogGreen = evt.getGreen();
	fogBlue = evt.getBlue();
}