|
|
|
@ -273,9 +273,6 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
int fpsCounter = 0;
|
|
|
|
|
long prevFrameTime = -1L;
|
|
|
|
|
|
|
|
|
|
/** Profiler currently displayed in the debug screen pie chart */
|
|
|
|
|
private String debugProfilerName = "root";
|
|
|
|
|
|
|
|
|
|
public Minecraft(Canvas par1Canvas, MinecraftApplet par2MinecraftApplet, int par3, int par4, boolean par5)
|
|
|
|
|
{
|
|
|
|
|
StatList.func_75919_a();
|
|
|
|
@ -877,7 +874,13 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.mcProfiler.profilingEnabled = true;
|
|
|
|
|
this.displayDebugInfo(var7);
|
|
|
|
|
this.displayDebugInfo(var7, this.mcProfiler, 0);
|
|
|
|
|
if(isIntegratedServerRunning()) {
|
|
|
|
|
Profiler pf = getIntegratedServer().theProfiler;
|
|
|
|
|
if(pf.profilingEnabled) {
|
|
|
|
|
this.displayDebugInfo(var7, pf, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -928,7 +931,7 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
{
|
|
|
|
|
field_71470_ab = this.fpsCounter;
|
|
|
|
|
this.debug = field_71470_ab + " fps, " + WorldRenderer.chunksUpdated + " chunk updates";
|
|
|
|
|
this.extraDebug = String.format("BC: %d", BigInteger.getAndClearCreateCounter());
|
|
|
|
|
this.extraDebug = String.format("BC: %d, BR: %d", BigInteger.getAndClearCreateCounter(), BigInteger.getAndClearFreeCounter());
|
|
|
|
|
WorldRenderer.chunksUpdated = 0;
|
|
|
|
|
this.debugUpdateTime += 1000L;
|
|
|
|
|
this.fpsCounter = 0;
|
|
|
|
@ -1010,7 +1013,15 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
*/
|
|
|
|
|
private void updateDebugProfilerName(int par1)
|
|
|
|
|
{
|
|
|
|
|
List var2 = this.mcProfiler.getProfilingData(this.debugProfilerName);
|
|
|
|
|
Profiler currentProfiler = mcProfiler;
|
|
|
|
|
if(isIntegratedServerRunning()) {
|
|
|
|
|
Profiler pf = getIntegratedServer().theProfiler;
|
|
|
|
|
if(pf.profilingEnabled) {
|
|
|
|
|
currentProfiler = pf;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String debugProfilerName = currentProfiler.debugProfilerName;
|
|
|
|
|
List var2 = currentProfiler.getProfilingData(debugProfilerName);
|
|
|
|
|
|
|
|
|
|
if (var2 != null && !var2.isEmpty())
|
|
|
|
|
{
|
|
|
|
@ -1020,11 +1031,11 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
{
|
|
|
|
|
if (var3.field_76331_c.length() > 0)
|
|
|
|
|
{
|
|
|
|
|
int var4 = this.debugProfilerName.lastIndexOf(".");
|
|
|
|
|
int var4 = debugProfilerName.lastIndexOf(".");
|
|
|
|
|
|
|
|
|
|
if (var4 >= 0)
|
|
|
|
|
{
|
|
|
|
|
this.debugProfilerName = this.debugProfilerName.substring(0, var4);
|
|
|
|
|
debugProfilerName = debugProfilerName.substring(0, var4);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1034,22 +1045,23 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
|
|
|
|
|
if (par1 < var2.size() && !((ProfilerResult)var2.get(par1)).field_76331_c.equals("unspecified"))
|
|
|
|
|
{
|
|
|
|
|
if (this.debugProfilerName.length() > 0)
|
|
|
|
|
if (debugProfilerName.length() > 0)
|
|
|
|
|
{
|
|
|
|
|
this.debugProfilerName = this.debugProfilerName + ".";
|
|
|
|
|
debugProfilerName = debugProfilerName + ".";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.debugProfilerName = this.debugProfilerName + ((ProfilerResult)var2.get(par1)).field_76331_c;
|
|
|
|
|
debugProfilerName = debugProfilerName + ((ProfilerResult)var2.get(par1)).field_76331_c;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
currentProfiler.debugProfilerName = debugProfilerName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void displayDebugInfo(long par1)
|
|
|
|
|
private void displayDebugInfo(long par1, Profiler pf, int offset)
|
|
|
|
|
{
|
|
|
|
|
if (this.mcProfiler.profilingEnabled)
|
|
|
|
|
if (pf.profilingEnabled)
|
|
|
|
|
{
|
|
|
|
|
List var3 = this.mcProfiler.getProfilingData(this.debugProfilerName);
|
|
|
|
|
List var3 = pf.getProfilingData(pf.debugProfilerName);
|
|
|
|
|
ProfilerResult var4 = (ProfilerResult)var3.remove(0);
|
|
|
|
|
GL11.glClear(256);
|
|
|
|
|
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
|
|
|
@ -1062,9 +1074,10 @@ public abstract class Minecraft implements Runnable, IPlayerUsage
|
|
|
|
|
GL11.glLineWidth(1.0F);
|
|
|
|
|
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
|
|
|
|
Tessellator var5 = Tessellator.instance;
|
|
|
|
|
short var6 = 160;
|
|
|
|
|
int var6 = 160;
|
|
|
|
|
int var7 = this.displayWidth - var6 - 10;
|
|
|
|
|
int var8 = this.displayHeight - var6 * 2;
|
|
|
|
|
GL11.glTranslated(-offset * var6 * 2 * 1.1 + 10, 0, 0);
|
|
|
|
|
GL11.glEnable(GL11.GL_BLEND);
|
|
|
|
|
var5.startDrawingQuads();
|
|
|
|
|
var5.setColorRGBA_I(0, 200);
|
|
|
|
|