RenderManager.java 文件源码

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

项目:DecompiledMinecraft 作者:
public boolean renderEntityStatic(Entity entity, float partialTicks, boolean p_147936_3_)
{
    if (entity.ticksExisted == 0)
    {
        entity.lastTickPosX = entity.posX;
        entity.lastTickPosY = entity.posY;
        entity.lastTickPosZ = entity.posZ;
    }

    double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
    double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
    double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks;
    float f = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks;
    int i = entity.getBrightnessForRender(partialTicks);

    if (entity.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    return this.doRenderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, partialTicks, p_147936_3_);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号