WorldRenderer.java 文件源码

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

项目:RuneCraftery 作者:
/**
 * Sets a new position for the renderer and setting it up so it can be reloaded with the new data for that position
 */
public void setPosition(int par1, int par2, int par3)
{
    if (par1 != this.posX || par2 != this.posY || par3 != this.posZ)
    {
        this.setDontDraw();
        this.posX = par1;
        this.posY = par2;
        this.posZ = par3;
        this.posXPlus = par1 + 8;
        this.posYPlus = par2 + 8;
        this.posZPlus = par3 + 8;
        this.posXClip = par1 & 1023;
        this.posYClip = par2;
        this.posZClip = par3 & 1023;
        this.posXMinus = par1 - this.posXClip;
        this.posYMinus = par2 - this.posYClip;
        this.posZMinus = par3 - this.posZClip;
        float f = 6.0F;
        this.rendererBoundingBox = AxisAlignedBB.getBoundingBox((double)((float)par1 - f), (double)((float)par2 - f), (double)((float)par3 - f), (double)((float)(par1 + 16) + f), (double)((float)(par2 + 16) + f), (double)((float)(par3 + 16) + f));
        GL11.glNewList(this.glRenderList + 2, GL11.GL_COMPILE);
        RenderItem.renderAABB(AxisAlignedBB.getAABBPool().getAABB((double)((float)this.posXClip - f), (double)((float)this.posYClip - f), (double)((float)this.posZClip - f), (double)((float)(this.posXClip + 16) + f), (double)((float)(this.posYClip + 16) + f), (double)((float)(this.posZClip + 16) + f)));
        GL11.glEndList();
        this.markDirty();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号