Fix swapped yaw/pitch in camera setup event
This commit is contained in:
parent
d8e6181058
commit
3ba78225c3
2 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
this.func_216776_a(direction != null ? direction.func_185119_l() - 180.0F : 0.0F, 0.0F);
|
this.func_216776_a(direction != null ? direction.func_185119_l() - 180.0F : 0.0F, 0.0F);
|
||||||
this.func_216782_a(0.0D, 0.3D, 0.0D);
|
this.func_216782_a(0.0D, 0.3D, 0.0D);
|
||||||
}
|
}
|
||||||
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup cameraSetup = net.minecraftforge.client.ForgeHooksClient.onCameraSetup(net.minecraft.client.Minecraft.func_71410_x().field_71460_t, this, p_216772_5_, this.field_216797_i, this.field_216798_j, 0f);
|
+ net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup cameraSetup = net.minecraftforge.client.ForgeHooksClient.onCameraSetup(net.minecraft.client.Minecraft.func_71410_x().field_71460_t, this, p_216772_5_, this.field_216798_j, this.field_216797_i, 0f);
|
||||||
+ this.field_216797_i = cameraSetup.getPitch();
|
+ this.field_216797_i = cameraSetup.getPitch();
|
||||||
+ this.field_216798_j = cameraSetup.getYaw();
|
+ this.field_216798_j = cameraSetup.getYaw();
|
||||||
+ GlStateManager.rotatef(cameraSetup.getRoll(), 0, 0, 1);
|
+ GlStateManager.rotatef(cameraSetup.getRoll(), 0, 0, 1);
|
||||||
|
|
|
@ -358,9 +358,9 @@ public class ForgeHooksClient
|
||||||
MinecraftForge.EVENT_BUS.post(new EntityViewRenderEvent.RenderFogEvent(fogRenderer, renderer, info, partial, mode, distance));
|
MinecraftForge.EVENT_BUS.post(new EntityViewRenderEvent.RenderFogEvent(fogRenderer, renderer, info, partial, mode, distance));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EntityViewRenderEvent.CameraSetup onCameraSetup(GameRenderer renderer, ActiveRenderInfo info, float partial, float pitch, float yaw, float roll)
|
public static EntityViewRenderEvent.CameraSetup onCameraSetup(GameRenderer renderer, ActiveRenderInfo info, float partial, float yaw, float pitch, float roll)
|
||||||
{
|
{
|
||||||
EntityViewRenderEvent.CameraSetup event = new EntityViewRenderEvent.CameraSetup(renderer, info, partial, pitch, yaw, roll);
|
EntityViewRenderEvent.CameraSetup event = new EntityViewRenderEvent.CameraSetup(renderer, info, partial, yaw, pitch, roll);
|
||||||
MinecraftForge.EVENT_BUS.post(event);
|
MinecraftForge.EVENT_BUS.post(event);
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue