Restore camera setup render event (#6335)
This commit is contained in:
parent
bb4e78da90
commit
d8e6181058
2 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,17 @@
|
||||||
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java
|
--- a/net/minecraft/client/renderer/ActiveRenderInfo.java
|
||||||
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
|
+++ b/net/minecraft/client/renderer/ActiveRenderInfo.java
|
||||||
@@ -172,4 +172,11 @@
|
@@ -53,6 +53,10 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
+ 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);
|
||||||
|
+ this.field_216797_i = cameraSetup.getPitch();
|
||||||
|
+ this.field_216798_j = cameraSetup.getYaw();
|
||||||
|
+ GlStateManager.rotatef(cameraSetup.getRoll(), 0, 0, 1);
|
||||||
|
|
||||||
|
GlStateManager.rotatef(this.field_216797_i, 1.0F, 0.0F, 0.0F);
|
||||||
|
GlStateManager.rotatef(this.field_216798_j + 180.0F, 0.0F, 1.0F, 0.0F);
|
||||||
|
@@ -172,4 +176,11 @@
|
||||||
this.field_216791_c = null;
|
this.field_216791_c = null;
|
||||||
this.field_216789_a = false;
|
this.field_216789_a = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,6 +357,13 @@ 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)
|
||||||
|
{
|
||||||
|
EntityViewRenderEvent.CameraSetup event = new EntityViewRenderEvent.CameraSetup(renderer, info, partial, pitch, yaw, roll);
|
||||||
|
MinecraftForge.EVENT_BUS.post(event);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
|
|
||||||
public static void onModelBake(ModelManager modelManager, Map<ResourceLocation, IBakedModel> modelRegistry, ModelLoader modelLoader)
|
public static void onModelBake(ModelManager modelManager, Map<ResourceLocation, IBakedModel> modelRegistry, ModelLoader modelLoader)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue