当前位置: 首页>>代码示例>>Java>>正文


Java Profiler.Result方法代码示例

本文整理汇总了Java中net.minecraft.profiler.Profiler.Result方法的典型用法代码示例。如果您正苦于以下问题:Java Profiler.Result方法的具体用法?Java Profiler.Result怎么用?Java Profiler.Result使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.profiler.Profiler的用法示例。


在下文中一共展示了Profiler.Result方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_147202_a

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
private void func_147202_a(int p_147202_1_, String p_147202_2_, StringBuilder p_147202_3_)
{
    List<Profiler.Result> list = MinecraftServer.getServer().theProfiler.getProfilingData(p_147202_2_);

    if (list != null && list.size() >= 3)
    {
        for (int i = 1; i < list.size(); ++i)
        {
            Profiler.Result profiler$result = (Profiler.Result)list.get(i);
            p_147202_3_.append(String.format("[%02d] ", new Object[] {Integer.valueOf(p_147202_1_)}));

            for (int j = 0; j < p_147202_1_; ++j)
            {
                p_147202_3_.append(" ");
            }

            p_147202_3_.append(profiler$result.field_76331_c).append(" - ").append(String.format("%.2f", new Object[] {Double.valueOf(profiler$result.field_76332_a)})).append("%/").append(String.format("%.2f", new Object[] {Double.valueOf(profiler$result.field_76330_b)})).append("%\n");

            if (!profiler$result.field_76331_c.equals("unspecified"))
            {
                try
                {
                    this.func_147202_a(p_147202_1_ + 1, p_147202_2_ + "." + profiler$result.field_76331_c, p_147202_3_);
                }
                catch (Exception exception)
                {
                    p_147202_3_.append("[[ EXCEPTION ").append((Object)exception).append(" ]]");
                }
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:33,代码来源:CommandDebug.java

示例2: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
/**
 * Update debugProfilerName in response to number keys in debug screen
 */
private void updateDebugProfilerName(int keyCount)
{
    List<Profiler.Result> list = this.mcProfiler.getProfilingData(this.debugProfilerName);

    if (list != null && !list.isEmpty())
    {
        Profiler.Result profiler$result = (Profiler.Result)list.remove(0);

        if (keyCount == 0)
        {
            if (profiler$result.field_76331_c.length() > 0)
            {
                int i = this.debugProfilerName.lastIndexOf(".");

                if (i >= 0)
                {
                    this.debugProfilerName = this.debugProfilerName.substring(0, i);
                }
            }
        }
        else
        {
            --keyCount;

            if (keyCount < list.size() && !((Profiler.Result)list.get(keyCount)).field_76331_c.equals("unspecified"))
            {
                if (this.debugProfilerName.length() > 0)
                {
                    this.debugProfilerName = this.debugProfilerName + ".";
                }

                this.debugProfilerName = this.debugProfilerName + ((Profiler.Result)list.get(keyCount)).field_76331_c;
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:40,代码来源:Minecraft.java

示例3: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
/**
 * Update debugProfilerName in response to number keys in debug screen
 */
private void updateDebugProfilerName(int keyCount) {
	List<Profiler.Result> list = this.mcProfiler.getProfilingData(this.debugProfilerName);

	if (list != null && !list.isEmpty()) {
		Profiler.Result profiler$result = (Profiler.Result) list.remove(0);

		if (keyCount == 0) {
			if (profiler$result.field_76331_c.length() > 0) {
				int i = this.debugProfilerName.lastIndexOf(".");

				if (i >= 0) {
					this.debugProfilerName = this.debugProfilerName.substring(0, i);
				}
			}
		} else {
			--keyCount;

			if (keyCount < list.size()
					&& !((Profiler.Result) list.get(keyCount)).field_76331_c.equals("unspecified")) {
				if (this.debugProfilerName.length() > 0) {
					this.debugProfilerName = this.debugProfilerName + ".";
				}

				this.debugProfilerName = this.debugProfilerName
						+ ((Profiler.Result) list.get(keyCount)).field_76331_c;
			}
		}
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:33,代码来源:Minecraft.java

示例4: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
/**
 * Update debugProfilerName in response to number keys in debug screen
 */
private void updateDebugProfilerName(int keyCount)
{
    List<Profiler.Result> list = this.mcProfiler.getProfilingData(this.debugProfilerName);

    if (!list.isEmpty())
    {
        Profiler.Result profiler$result = (Profiler.Result)list.remove(0);

        if (keyCount == 0)
        {
            if (!profiler$result.profilerName.isEmpty())
            {
                int i = this.debugProfilerName.lastIndexOf(46);

                if (i >= 0)
                {
                    this.debugProfilerName = this.debugProfilerName.substring(0, i);
                }
            }
        }
        else
        {
            --keyCount;

            if (keyCount < list.size() && !"unspecified".equals(((Profiler.Result)list.get(keyCount)).profilerName))
            {
                if (!this.debugProfilerName.isEmpty())
                {
                    this.debugProfilerName = this.debugProfilerName + ".";
                }

                this.debugProfilerName = this.debugProfilerName + ((Profiler.Result)list.get(keyCount)).profilerName;
            }
        }
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:40,代码来源:Minecraft.java

示例5: appendProfilerResults

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
private void appendProfilerResults(int p_184895_1_, String sectionName, StringBuilder builder, MinecraftServer server)
{
    List<Profiler.Result> list = server.theProfiler.getProfilingData(sectionName);

    if (list != null && list.size() >= 3)
    {
        for (int i = 1; i < list.size(); ++i)
        {
            Profiler.Result profiler$result = (Profiler.Result)list.get(i);
            builder.append(String.format("[%02d] ", new Object[] {Integer.valueOf(p_184895_1_)}));

            for (int j = 0; j < p_184895_1_; ++j)
            {
                builder.append("|   ");
            }

            builder.append(profiler$result.profilerName).append(" - ").append(String.format("%.2f", new Object[] {Double.valueOf(profiler$result.usePercentage)})).append("%/").append(String.format("%.2f", new Object[] {Double.valueOf(profiler$result.totalUsePercentage)})).append("%\n");

            if (!"unspecified".equals(profiler$result.profilerName))
            {
                try
                {
                    this.appendProfilerResults(p_184895_1_ + 1, sectionName + "." + profiler$result.profilerName, builder, server);
                }
                catch (Exception exception)
                {
                    builder.append("[[ EXCEPTION ").append((Object)exception).append(" ]]");
                }
            }
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:33,代码来源:CommandDebug.java

示例6: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
/**
 * Update debugProfilerName in response to number keys in debug screen
 */
private void updateDebugProfilerName(int keyCount)
{
    List<Profiler.Result> list = this.mcProfiler.getProfilingData(this.debugProfilerName);

    if (list != null && !list.isEmpty())
    {
        Profiler.Result profiler$result = (Profiler.Result)list.remove(0);

        if (keyCount == 0)
        {
            if (!profiler$result.profilerName.isEmpty())
            {
                int i = this.debugProfilerName.lastIndexOf(46);

                if (i >= 0)
                {
                    this.debugProfilerName = this.debugProfilerName.substring(0, i);
                }
            }
        }
        else
        {
            --keyCount;

            if (keyCount < list.size() && !"unspecified".equals(((Profiler.Result)list.get(keyCount)).profilerName))
            {
                if (!this.debugProfilerName.isEmpty())
                {
                    this.debugProfilerName = this.debugProfilerName + ".";
                }

                this.debugProfilerName = this.debugProfilerName + ((Profiler.Result)list.get(keyCount)).profilerName;
            }
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:40,代码来源:Minecraft.java

示例7: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
private String updateDebugProfilerName(String in, String next) {
	List<Profiler.Result> list = FMLCommonHandler.instance().getMinecraftServerInstance().profiler.getProfilingData(in);

	if (!list.isEmpty()) {
		if (list.stream().anyMatch(r -> r.profilerName.equals(next)) && !"unspecified".equals(next)) {
			if (!in.isEmpty()) {
				in = in + ".";
			}

			in = in + next;
		}
	}
	return in;
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:15,代码来源:PlayerHandler.java

示例8: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
/**
 * Update debugProfilerName in response to number keys in debug screen
 */
private void updateDebugProfilerName(int par1)
{
    List var2 = this.mcProfiler.getProfilingData(this.debugProfilerName);

    if (var2 != null && !var2.isEmpty())
    {
        Profiler.Result var3 = (Profiler.Result)var2.remove(0);

        if (par1 == 0)
        {
            if (var3.field_76331_c.length() > 0)
            {
                int var4 = this.debugProfilerName.lastIndexOf(".");

                if (var4 >= 0)
                {
                    this.debugProfilerName = this.debugProfilerName.substring(0, var4);
                }
            }
        }
        else
        {
            --par1;

            if (par1 < var2.size() && !((Profiler.Result)var2.get(par1)).field_76331_c.equals("unspecified"))
            {
                if (this.debugProfilerName.length() > 0)
                {
                    this.debugProfilerName = this.debugProfilerName + ".";
                }

                this.debugProfilerName = this.debugProfilerName + ((Profiler.Result)var2.get(par1)).field_76331_c;
            }
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:40,代码来源:Minecraft.java

示例9: func_147202_a

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
private void func_147202_a(int p_147202_1_, String p_147202_2_, StringBuilder p_147202_3_)
{
    List var4 = MinecraftServer.getServer().theProfiler.getProfilingData(p_147202_2_);

    if (var4 != null && var4.size() >= 3)
    {
        for (int var5 = 1; var5 < var4.size(); ++var5)
        {
            Profiler.Result var6 = (Profiler.Result)var4.get(var5);
            p_147202_3_.append(String.format("[%02d] ", new Object[] {Integer.valueOf(p_147202_1_)}));

            for (int var7 = 0; var7 < p_147202_1_; ++var7)
            {
                p_147202_3_.append(" ");
            }

            p_147202_3_.append(var6.field_76331_c);
            p_147202_3_.append(" - ");
            p_147202_3_.append(String.format("%.2f", new Object[] {Double.valueOf(var6.field_76332_a)}));
            p_147202_3_.append("%/");
            p_147202_3_.append(String.format("%.2f", new Object[] {Double.valueOf(var6.field_76330_b)}));
            p_147202_3_.append("%\n");

            if (!var6.field_76331_c.equals("unspecified"))
            {
                try
                {
                    this.func_147202_a(p_147202_1_ + 1, p_147202_2_ + "." + var6.field_76331_c, p_147202_3_);
                }
                catch (Exception var8)
                {
                    p_147202_3_.append("[[ EXCEPTION " + var8 + " ]]");
                }
            }
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:38,代码来源:CommandDebug.java

示例10: updateDebugProfilerName

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
private void updateDebugProfilerName(int p_71383_1_)
{
    List list = this.mcProfiler.getProfilingData(this.debugProfilerName);

    if (list != null && !list.isEmpty())
    {
        Profiler.Result result = (Profiler.Result)list.remove(0);

        if (p_71383_1_ == 0)
        {
            if (result.field_76331_c.length() > 0)
            {
                int j = this.debugProfilerName.lastIndexOf(".");

                if (j >= 0)
                {
                    this.debugProfilerName = this.debugProfilerName.substring(0, j);
                }
            }
        }
        else
        {
            --p_71383_1_;

            if (p_71383_1_ < list.size() && !((Profiler.Result)list.get(p_71383_1_)).field_76331_c.equals("unspecified"))
            {
                if (this.debugProfilerName.length() > 0)
                {
                    this.debugProfilerName = this.debugProfilerName + ".";
                }

                this.debugProfilerName = this.debugProfilerName + ((Profiler.Result)list.get(p_71383_1_)).field_76331_c;
            }
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:37,代码来源:Minecraft.java

示例11: func_147202_a

import net.minecraft.profiler.Profiler; //导入方法依赖的package包/类
private void func_147202_a(int p_147202_1_, String p_147202_2_, StringBuilder p_147202_3_)
{
    List list = MinecraftServer.getServer().theProfiler.getProfilingData(p_147202_2_);

    if (list != null && list.size() >= 3)
    {
        for (int j = 1; j < list.size(); ++j)
        {
            Profiler.Result result = (Profiler.Result)list.get(j);
            p_147202_3_.append(String.format("[%02d] ", new Object[] {Integer.valueOf(p_147202_1_)}));

            for (int k = 0; k < p_147202_1_; ++k)
            {
                p_147202_3_.append(" ");
            }

            p_147202_3_.append(result.field_76331_c);
            p_147202_3_.append(" - ");
            p_147202_3_.append(String.format("%.2f", new Object[] {Double.valueOf(result.field_76332_a)}));
            p_147202_3_.append("%/");
            p_147202_3_.append(String.format("%.2f", new Object[] {Double.valueOf(result.field_76330_b)}));
            p_147202_3_.append("%\n");

            if (!result.field_76331_c.equals("unspecified"))
            {
                try
                {
                    this.func_147202_a(p_147202_1_ + 1, p_147202_2_ + "." + result.field_76331_c, p_147202_3_);
                }
                catch (Exception exception)
                {
                    p_147202_3_.append("[[ EXCEPTION " + exception + " ]]");
                }
            }
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:38,代码来源:CommandDebug.java


注:本文中的net.minecraft.profiler.Profiler.Result方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。