Cache world on all render passes in case some mod disables the first pass.
This commit is contained in:
parent
461a30812b
commit
baf1e771e9
2 changed files with 17 additions and 15 deletions
|
@ -95,21 +95,25 @@
|
|||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
}
|
||||
@@ -1222,6 +1233,13 @@
|
||||
@@ -1222,6 +1233,17 @@
|
||||
renderglobal.sortAndRender(entitylivingbase, 1, (double)par1);
|
||||
}
|
||||
|
||||
+ RenderHelper.enableStandardItemLighting();
|
||||
+ this.mc.mcProfiler.endStartSection("entities");
|
||||
+ ForgeHooksClient.setRenderPass(1);
|
||||
+ renderglobal.renderEntities(entitylivingbase.getPosition(par1), frustrum, par1);
|
||||
+ ForgeHooksClient.setRenderPass(-1);
|
||||
+ RenderHelper.disableStandardItemLighting();
|
||||
+
|
||||
+ if (this.debugViewDirection == 0) //Only render if render pass 0 happens as well.
|
||||
+ {
|
||||
+ RenderHelper.enableStandardItemLighting();
|
||||
+ this.mc.mcProfiler.endStartSection("entities");
|
||||
+ ForgeHooksClient.setRenderPass(1);
|
||||
+ renderglobal.renderEntities(entitylivingbase.getPosition(par1), frustrum, par1);
|
||||
+ ForgeHooksClient.setRenderPass(-1);
|
||||
+ RenderHelper.disableStandardItemLighting();
|
||||
+ }
|
||||
+
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
@@ -1231,14 +1249,17 @@
|
||||
@@ -1231,14 +1253,17 @@
|
||||
entityplayer = (EntityPlayer)entitylivingbase;
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
this.mc.mcProfiler.endStartSection("outline");
|
||||
|
@ -129,7 +133,7 @@
|
|||
GL11.glDisable(GL11.GL_BLEND);
|
||||
this.mc.mcProfiler.endStartSection("weather");
|
||||
this.renderRainSnow(par1);
|
||||
@@ -1248,6 +1269,20 @@
|
||||
@@ -1248,6 +1273,20 @@
|
||||
{
|
||||
this.renderCloudsCheck(renderglobal, par1);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class RenderGlobal implements IWorldAccess
|
||||
{
|
||||
@@ -447,35 +450,47 @@
|
||||
@@ -447,8 +450,13 @@
|
||||
*/
|
||||
public void renderEntities(Vec3 par1Vec3, ICamera par2ICamera, float par3)
|
||||
{
|
||||
|
@ -24,10 +24,10 @@
|
|||
--this.renderEntitiesStartupCounter;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -456,26 +464,33 @@
|
||||
this.theWorld.theProfiler.startSection("prepare");
|
||||
- TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
||||
- RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
||||
TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
||||
RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
||||
- this.countEntitiesTotal = 0;
|
||||
- this.countEntitiesRendered = 0;
|
||||
- this.countEntitiesHidden = 0;
|
||||
|
@ -40,8 +40,6 @@
|
|||
- TileEntityRenderer.staticPlayerZ = entitylivingbase.lastTickPosZ + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double)par3;
|
||||
+ if (pass == 0)
|
||||
+ {
|
||||
+ TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
||||
+ RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
||||
+ this.countEntitiesTotal = 0;
|
||||
+ this.countEntitiesRendered = 0;
|
||||
+ this.countEntitiesHidden = 0;
|
||||
|
|
Loading…
Reference in a new issue