EntityRenderer.java 文件源码

java
阅读 20 收藏 0 点赞 0 评论 0

项目:Backmemed 作者:
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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号