mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 10:34:49 +00:00
Added an event for fog rendering
This commit is contained in:
1 parent
a22bcf7e72
commit
2affeae979
2 files changed
+26
No files matched your search
@@ -5,6 +5,7 @@ import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
|
||||
/**
|
||||
* Event that hooks into EntityRenderer, allowing any feature to customize visual attributes of
|
||||
@@ -40,6 +41,23 @@ public abstract class EntityViewRenderEvent extends Event
|
||||
this.density = density;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event that allows any feature to customize the rendering of fog.
|
||||
*/
|
||||
@HasResult
|
||||
public static class RenderFogEvent extends EntityViewRenderEvent
|
||||
{
|
||||
public final int fogMode;
|
||||
public final float farPlaneDistance;
|
||||
|
||||
public RenderFogEvent(EntityRenderer renderer, EntityLivingBase entity, Block block, double renderPartialTicks, int fogMode, float farPlaneDistance)
|
||||
{
|
||||
super(renderer, entity, block, renderPartialTicks);
|
||||
this.fogMode = fogMode;
|
||||
this.farPlaneDistance = farPlaneDistance;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event that allows any feature to customize the color of fog the player sees.
|
||||
|
||||
Reference in new issue
Block a user