Added CameraSetup sub-event for camera angles

Allows players to alter yaw and pitch of renderViewEntity, but more importantly, adds the ability to roll the view.

Added camera roll hook
This commit is contained in:
Flan committed 2015-05-19 16:14:44 +01:00
1 parent 7ab952d410
commit 306af4feee
2 files changed
+57 -11

No files matched your search

@@ -78,4 +78,22 @@ public abstract class EntityViewRenderEvent extends Event
this.blue = blue;
}
}
/**
* Event that allows mods to alter the angles of the player's camera. Mainly useful for applying roll.
*/
public static class CameraSetup extends EntityViewRenderEvent
{
public float yaw;
public float pitch;
public float roll;
public CameraSetup(EntityRenderer renderer, Entity entity, Block block, double renderPartialTicks, float yaw, float pitch, float roll)
{
super(renderer, entity, block, renderPartialTicks);
this.yaw = yaw;
this.pitch = pitch;
this.roll = roll;
}
}
}