当前位置: 首页>>代码示例>>Java>>正文


Java EnumWorldBlockLayer.TRANSLUCENT属性代码示例

本文整理汇总了Java中net.minecraft.util.EnumWorldBlockLayer.TRANSLUCENT属性的典型用法代码示例。如果您正苦于以下问题:Java EnumWorldBlockLayer.TRANSLUCENT属性的具体用法?Java EnumWorldBlockLayer.TRANSLUCENT怎么用?Java EnumWorldBlockLayer.TRANSLUCENT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraft.util.EnumWorldBlockLayer的用法示例。


在下文中一共展示了EnumWorldBlockLayer.TRANSLUCENT属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBlockLayer

public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.TRANSLUCENT;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:4,代码来源:BlockStainedGlassPane.java

示例2: postRenderBlocks

private void postRenderBlocks(EnumWorldBlockLayer layer, float x, float y, float z, WorldRenderer worldRendererIn, CompiledChunk compiledChunkIn)
{
    if (layer == EnumWorldBlockLayer.TRANSLUCENT && !compiledChunkIn.isLayerEmpty(layer))
    {
        worldRendererIn.func_181674_a(x, y, z);
        compiledChunkIn.setState(worldRendererIn.func_181672_a());
    }

    worldRendererIn.finishDrawing();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:RenderChunk.java

示例3: isBlockTranslucent

/**
 * Returns true if given block is translucent
 */
private boolean isBlockTranslucent(Block blockIn)
{
    return blockIn != null && blockIn.getBlockLayer() == EnumWorldBlockLayer.TRANSLUCENT;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:7,代码来源:ItemRenderer.java

示例4: getBlockLayer

public EnumWorldBlockLayer getBlockLayer()
{
    return this.blockMaterial == Material.water ? EnumWorldBlockLayer.TRANSLUCENT : EnumWorldBlockLayer.SOLID;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:4,代码来源:BlockLiquid.java

示例5: renderBlockLayer

public int renderBlockLayer(EnumWorldBlockLayer blockLayerIn, double partialTicks, int pass, Entity entityIn)
{
    RenderHelper.disableStandardItemLighting();

    if (blockLayerIn == EnumWorldBlockLayer.TRANSLUCENT)
    {
        this.mc.mcProfiler.startSection("translucent_sort");
        double d0 = entityIn.posX - this.prevRenderSortX;
        double d1 = entityIn.posY - this.prevRenderSortY;
        double d2 = entityIn.posZ - this.prevRenderSortZ;

        if (d0 * d0 + d1 * d1 + d2 * d2 > 1.0D)
        {
            this.prevRenderSortX = entityIn.posX;
            this.prevRenderSortY = entityIn.posY;
            this.prevRenderSortZ = entityIn.posZ;
            int k = 0;

            for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation : this.renderInfos)
            {
                if (renderglobal$containerlocalrenderinformation.renderChunk.compiledChunk.isLayerStarted(blockLayerIn) && k++ < 15)
                {
                    this.renderDispatcher.updateTransparencyLater(renderglobal$containerlocalrenderinformation.renderChunk);
                }
            }
        }

        this.mc.mcProfiler.endSection();
    }

    this.mc.mcProfiler.startSection("filterempty");
    int l = 0;
    boolean flag = blockLayerIn == EnumWorldBlockLayer.TRANSLUCENT;
    int i1 = flag ? this.renderInfos.size() - 1 : 0;
    int i = flag ? -1 : this.renderInfos.size();
    int j1 = flag ? -1 : 1;

    for (int j = i1; j != i; j += j1)
    {
        RenderChunk renderchunk = ((RenderGlobal.ContainerLocalRenderInformation)this.renderInfos.get(j)).renderChunk;

        if (!renderchunk.getCompiledChunk().isLayerEmpty(blockLayerIn))
        {
            ++l;
            this.renderContainer.addRenderChunk(renderchunk, blockLayerIn);
        }
    }

    this.mc.mcProfiler.endStartSection("render_" + blockLayerIn);
    this.renderBlockLayer(blockLayerIn);
    this.mc.mcProfiler.endSection();
    return l;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:53,代码来源:RenderGlobal.java

示例6: renderBlockLayer

public int renderBlockLayer(EnumWorldBlockLayer blockLayerIn, double partialTicks, int pass, Entity entityIn)
{
    RenderHelper.disableStandardItemLighting();

    if (blockLayerIn == EnumWorldBlockLayer.TRANSLUCENT)
    {
        this.mc.mcProfiler.startSection("translucent_sort");
        double d0 = entityIn.posX - this.prevRenderSortX;
        double d1 = entityIn.posY - this.prevRenderSortY;
        double d2 = entityIn.posZ - this.prevRenderSortZ;

        if (d0 * d0 + d1 * d1 + d2 * d2 > 1.0D)
        {
            this.prevRenderSortX = entityIn.posX;
            this.prevRenderSortY = entityIn.posY;
            this.prevRenderSortZ = entityIn.posZ;
            int k = 0;
            Iterator iterator = this.renderInfos.iterator();
            this.chunksToResortTransparency.clear();

            while (iterator.hasNext())
            {
                RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation = (RenderGlobal.ContainerLocalRenderInformation)iterator.next();

                if (renderglobal$containerlocalrenderinformation.renderChunk.compiledChunk.isLayerStarted(blockLayerIn) && k++ < 15)
                {
                    this.chunksToResortTransparency.add(renderglobal$containerlocalrenderinformation.renderChunk);
                }
            }
        }

        this.mc.mcProfiler.endSection();
    }

    this.mc.mcProfiler.startSection("filterempty");
    int l = 0;
    boolean flag = blockLayerIn == EnumWorldBlockLayer.TRANSLUCENT;
    int i1 = flag ? this.renderInfos.size() - 1 : 0;
    int i = flag ? -1 : this.renderInfos.size();
    int j1 = flag ? -1 : 1;

    for (int j = i1; j != i; j += j1)
    {
        RenderChunk renderchunk = ((RenderGlobal.ContainerLocalRenderInformation)this.renderInfos.get(j)).renderChunk;

        if (!renderchunk.getCompiledChunk().isLayerEmpty(blockLayerIn))
        {
            ++l;
            this.renderContainer.addRenderChunk(renderchunk, blockLayerIn);
        }
    }

    if (l == 0)
    {
        this.mc.mcProfiler.endSection();
        return l;
    }
    else
    {
        if (Config.isFogOff() && this.mc.entityRenderer.fogStandard)
        {
            GlStateManager.disableFog();
        }

        this.mc.mcProfiler.endStartSection("render_" + blockLayerIn);
        this.renderBlockLayer(blockLayerIn);
        this.mc.mcProfiler.endSection();
        return l;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:70,代码来源:RenderGlobal.java

示例7: drawForIcon

private int drawForIcon(TextureAtlasSprite p_drawForIcon_1_, int p_drawForIcon_2_)
{
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, p_drawForIcon_1_.glSpriteTextureId);
    int i = -1;
    int j = -1;
    int k = this.vertexCount / 4;

    for (int l = p_drawForIcon_2_; l < k; ++l)
    {
        TextureAtlasSprite textureatlassprite = this.quadSprites[l];

        if (textureatlassprite == p_drawForIcon_1_)
        {
            if (j < 0)
            {
                j = l;
            }
        }
        else if (j >= 0)
        {
            this.draw(j, l);

            if (this.blockLayer == EnumWorldBlockLayer.TRANSLUCENT)
            {
                return l;
            }

            j = -1;

            if (i < 0)
            {
                i = l;
            }
        }
    }

    if (j >= 0)
    {
        this.draw(j, k);
    }

    if (i < 0)
    {
        i = k;
    }

    return i;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:48,代码来源:WorldRenderer.java

示例8: getBlockLayer

public EnumWorldBlockLayer getBlockLayer() {
	return this.blockMaterial == Material.water ? EnumWorldBlockLayer.TRANSLUCENT : EnumWorldBlockLayer.SOLID;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:3,代码来源:BlockLiquid.java


注:本文中的net.minecraft.util.EnumWorldBlockLayer.TRANSLUCENT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。