mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 18:45:09 +00:00
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:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user