本文整理汇总了Java中net.minecraft.client.renderer.chunk.RenderChunk.renderChunksUpdated方法的典型用法代码示例。如果您正苦于以下问题:Java RenderChunk.renderChunksUpdated方法的具体用法?Java RenderChunk.renderChunksUpdated怎么用?Java RenderChunk.renderChunksUpdated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.chunk.RenderChunk
的用法示例。
在下文中一共展示了RenderChunk.renderChunksUpdated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadAllVisibleChunks
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
private void loadAllVisibleChunks(Entity p_loadAllVisibleChunks_1_, double p_loadAllVisibleChunks_2_, ICamera p_loadAllVisibleChunks_4_, boolean p_loadAllVisibleChunks_5_)
{
RenderGlobal renderglobal = Config.getRenderGlobal();
int i = renderglobal.getCountLoadedChunks();
long j = System.currentTimeMillis();
Config.dbg("Loading visible chunks");
long k = System.currentTimeMillis() + 5000L;
int l = 0;
boolean flag = false;
while (true)
{
flag = false;
for (int i1 = 0; i1 < 100; ++i1)
{
renderglobal.displayListEntitiesDirty = true;
renderglobal.setupTerrain(p_loadAllVisibleChunks_1_, p_loadAllVisibleChunks_2_, p_loadAllVisibleChunks_4_, this.frameCount++, p_loadAllVisibleChunks_5_);
if (!renderglobal.hasNoChunkUpdates())
{
flag = true;
}
l = l + renderglobal.getCountChunksToUpdate();
renderglobal.updateChunks(System.nanoTime() + 1000000000L);
l = l - renderglobal.getCountChunksToUpdate();
}
if (renderglobal.getCountLoadedChunks() != i)
{
flag = true;
i = renderglobal.getCountLoadedChunks();
}
if (System.currentTimeMillis() > k)
{
Config.log("Chunks loaded: " + l);
k = System.currentTimeMillis() + 5000L;
}
if (!flag)
{
break;
}
}
Config.log("Chunks loaded: " + l);
Config.log("Finished loading visible chunks");
RenderChunk.renderChunksUpdated = 0;
}