当前位置: 首页>>代码示例>>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;未经允许,请勿转载。