本文整理汇总了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(" ]]");
}
}
}
}
}
示例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;
}
}
}
}
示例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;
}
}
}
}
示例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;
}
}
}
}
示例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(" ]]");
}
}
}
}
}
示例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;
}
}
}
}
示例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;
}
示例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;
}
}
}
}
示例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 + " ]]");
}
}
}
}
}
示例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;
}
}
}
}
示例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 + " ]]");
}
}
}
}
}