當前位置: 首頁>>代碼示例>>Java>>正文


Java RenderItem.renderAABB方法代碼示例

本文整理匯總了Java中net.minecraft.client.renderer.entity.RenderItem.renderAABB方法的典型用法代碼示例。如果您正苦於以下問題:Java RenderItem.renderAABB方法的具體用法?Java RenderItem.renderAABB怎麽用?Java RenderItem.renderAABB使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.client.renderer.entity.RenderItem的用法示例。


在下文中一共展示了RenderItem.renderAABB方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setPosition

import net.minecraft.client.renderer.entity.RenderItem; //導入方法依賴的package包/類
public void setPosition(int p_78913_1_, int p_78913_2_, int p_78913_3_)
{
    if (p_78913_1_ != this.posX || p_78913_2_ != this.posY || p_78913_3_ != this.posZ)
    {
        this.setDontDraw();
        this.posX = p_78913_1_;
        this.posY = p_78913_2_;
        this.posZ = p_78913_3_;
        this.posXPlus = p_78913_1_ + 8;
        this.posYPlus = p_78913_2_ + 8;
        this.posZPlus = p_78913_3_ + 8;
        this.posXClip = p_78913_1_ & 1023;
        this.posYClip = p_78913_2_;
        this.posZClip = p_78913_3_ & 1023;
        this.posXMinus = p_78913_1_ - this.posXClip;
        this.posYMinus = p_78913_2_ - this.posYClip;
        this.posZMinus = p_78913_3_ - this.posZClip;
        float f = 6.0F;
        this.rendererBoundingBox = AxisAlignedBB.getBoundingBox((double)((float)p_78913_1_ - f), (double)((float)p_78913_2_ - f), (double)((float)p_78913_3_ - f), (double)((float)(p_78913_1_ + 16) + f), (double)((float)(p_78913_2_ + 16) + f), (double)((float)(p_78913_3_ + 16) + f));
        GL11.glNewList(this.glRenderList + 2, GL11.GL_COMPILE);
        RenderItem.renderAABB(AxisAlignedBB.getBoundingBox((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();
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:26,代碼來源:WorldRenderer.java

示例2: setPosition

import net.minecraft.client.renderer.entity.RenderItem; //導入方法依賴的package包/類
/**
 * 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();
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:29,代碼來源:WorldRenderer.java

示例3: finishUpdate

import net.minecraft.client.renderer.entity.RenderItem; //導入方法依賴的package包/類
public void finishUpdate()
{
    int temp = this.glRenderList;
    this.glRenderList = this.glRenderListWork;
    this.glRenderListWork = temp;
    int lightCache;

    for (lightCache = 0; lightCache < 2; ++lightCache)
    {
        if (!this.skipRenderPass[lightCache])
        {
            GL11.glNewList(this.glRenderListWork + lightCache, GL11.GL_COMPILE);
            GL11.glEndList();
        }
    }

    for (lightCache = 0; lightCache < 2; ++lightCache)
    {
        this.skipRenderPass[lightCache] = this.tempSkipRenderPass[lightCache];
    }

    this.skipAllRenderPasses = this.skipRenderPass[0] && this.skipRenderPass[1];

    if (this.needsBoxUpdate && !this.skipAllRenderPasses())
    {
        GL11.glNewList(this.glRenderListBoundingBox, GL11.GL_COMPILE);
        RenderItem.renderAABB(AxisAlignedBB.getAABBPool().getAABB((double)this.posXClip, (double)this.posYClip, (double)this.posZClip, (double)(this.posXClip + 16), (double)(this.posYClip + 16), (double)(this.posZClip + 16)));
        GL11.glEndList();
        this.needsBoxUpdate = false;
    }

    this.vertexState = this.tempVertexState;
    this.isVisible = true;
    this.isVisibleFromPosition = false;

    if (Reflector.LightCache.exists())
    {
        Object var3 = Reflector.getFieldValue(Reflector.LightCache_cache);
        Reflector.callVoid(var3, Reflector.LightCache_clear, new Object[0]);
        Reflector.callVoid(Reflector.BlockCoord_resetPool, new Object[0]);
    }

    this.updateFinished();
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:45,代碼來源:WorldRendererThreaded.java


注:本文中的net.minecraft.client.renderer.entity.RenderItem.renderAABB方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。