MinecraftForge/MinecraftForge — pull request #414 by MamiyaOtaru (2013-02-15 09:01:55+00:00)
Title: small change to prevent mcProfiler breakage due to recent Forge commit

....patch

call this.theWorld.theProfiler.startSection("prepare"); for passes other than 0. EntityRenderer.renderWorld() now calls RenderGlobal.renderEntities() twice (for transparency - see https://github.com/MinecraftForge/MinecraftForge/blob/master/patches/minecraft/net/minecraft/client/renderer/EntityRenderer.java.patch section -1194,6 +1203,13 ).

On the second pass, that startSection() is not called, while the endSection() at the end of the method is called. This unbalances the mcProfiler stack.

Without that startSection, the endSection at the end kills off one more level than it should, prematurely ending profiler section "level". this.mc.mcProfiler.endStartSection("gui"); in EntityRenderer.updateCameraAndRender() now replaces "gameRenderer" with "gui" (with "root" as the next one down the stack) instead of replacing "level" with "gui" and leaving "gameRenderer" the next one down the stack.

This change keeps mcProfiler balanced.