本文整理了Java中net.minecraft.client.Minecraft.getDebugFPS()
方法的一些代码示例,展示了Minecraft.getDebugFPS()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.getDebugFPS()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:getDebugFPS
暂无
代码示例来源:origin: Darkhax-Minecraft/Bookshelf
/**
* Constructs a PerformanceInfo snapshot. Once constructed it can be used to get get info
* about the game at time of construction.
*/
public PerformanceInfo() {
this.fps = Minecraft.getDebugFPS();
this.chunkUpdates = RenderChunk.renderChunksUpdated;
final Runtime runtime = Runtime.getRuntime();
this.maxMemory = runtime.maxMemory();
this.totalMemory = runtime.totalMemory();
this.freeMemory = runtime.freeMemory();
this.usedMemory = this.totalMemory - this.freeMemory;
}
代码示例来源:origin: Lunatrius/Schematica
private void renderSchematic(final SchematicWorld schematic, final float partialTicks) {
if (this.world != schematic) {
this.world = schematic;
loadRenderers();
}
PLAYER_POSITION_OFFSET.set(ClientProxy.playerPosition).sub(this.world.position.x, this.world.position.y, this.world.position.z);
if (OpenGlHelper.shadersSupported && ConfigurationHandler.enableAlpha) {
GL20.glUseProgram(SHADER_ALPHA.getProgram());
GL20.glUniform1f(GL20.glGetUniformLocation(SHADER_ALPHA.getProgram(), "alpha_multiplier"), ConfigurationHandler.alpha);
}
final int fps = Math.max(Minecraft.getDebugFPS(), 30);
renderWorld(partialTicks, System.nanoTime() + 1000000000 / fps);
if (OpenGlHelper.shadersSupported && ConfigurationHandler.enableAlpha) {
GL20.glUseProgram(0);
}
}
内容来源于网络,如有侵权,请联系作者删除!