RenderGuardian.java 文件源码

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

项目:BaseClient 作者:
public boolean shouldRender(EntityGuardian livingEntity, ICamera camera, double camX, double camY, double camZ)
{
    if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
    {
        return true;
    }
    else
    {
        if (livingEntity.hasTargetedEntity())
        {
            EntityLivingBase entitylivingbase = livingEntity.getTargetedEntity();

            if (entitylivingbase != null)
            {
                Vec3 vec3 = this.func_177110_a(entitylivingbase, (double)entitylivingbase.height * 0.5D, 1.0F);
                Vec3 vec31 = this.func_177110_a(livingEntity, (double)livingEntity.getEyeHeight(), 1.0F);

                if (camera.isBoundingBoxInFrustum(AxisAlignedBB.fromBounds(vec31.xCoord, vec31.yCoord, vec31.zCoord, vec3.xCoord, vec3.yCoord, vec3.zCoord)))
                {
                    return true;
                }
            }
        }

        return false;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号