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


Java BlockRenderLayer.TRANSLUCENT属性代码示例

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


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

示例1: deserialize

@Override
public BlockRenderLayer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
    if (json.isJsonPrimitive())
    {
        JsonPrimitive primitive = json.getAsJsonPrimitive();
        if (primitive.isString())
        {
            String string = primitive.getAsString();
            if (string.equals("solid"))
                return BlockRenderLayer.SOLID;
            if (string.equals("mippedCutout"))
                return BlockRenderLayer.CUTOUT_MIPPED;
            if (string.equals("cutout"))
                return BlockRenderLayer.CUTOUT;
            if (string.equals("translucent"))
                return BlockRenderLayer.TRANSLUCENT;
        }
    }

    throw new JsonParseException("Invalid block render layer: " + json);
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:22,代码来源:BlockRenderLayerDeserializer.java

示例2: isBlockTranslucent

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

示例3: getBlockLayer

@Override
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:4,代码来源:CookieJar.java

示例4: getBlockLayer

@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:4,代码来源:BlockFakeIce.java

示例5: getBlockLayer

public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:4,代码来源:BlockTripWire.java

示例6: renderBlockLayer

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

    if (blockLayerIn == BlockRenderLayer.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;
            this.chunksToResortTransparency.clear();

            for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation : this.renderInfos)
            {
                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 == BlockRenderLayer.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:sudofox,项目名称:Backmemed,代码行数:67,代码来源:RenderGlobal.java

示例7: getBlockLayer

@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
   {
       return BlockRenderLayer.TRANSLUCENT;
   }
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:5,代码来源:HarshenSpawner.java

示例8: getBlockLayer

@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:BlockSlime.java

示例9: getBlockLayer

@Override
public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:5,代码来源:BlockCrystalSmall.java

示例10: getBlockLayer

@Override
public BlockRenderLayer getBlockLayer()
{
	return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:5,代码来源:BlockIce.java

示例11: drawMultiTexture

public void drawMultiTexture()
{
    if (this.quadSprites != null)
    {
        int i = Config.getMinecraft().getTextureMapBlocks().getCountRegisteredSprites();

        if (this.drawnIcons.length <= i)
        {
            this.drawnIcons = new boolean[i + 1];
        }

        Arrays.fill(this.drawnIcons, false);
        int j = 0;
        int k = -1;
        int l = this.vertexCount / 4;

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

            if (textureatlassprite != null)
            {
                int j1 = textureatlassprite.getIndexInMap();

                if (!this.drawnIcons[j1])
                {
                    if (textureatlassprite == TextureUtils.iconGrassSideOverlay)
                    {
                        if (k < 0)
                        {
                            k = i1;
                        }
                    }
                    else
                    {
                        i1 = this.drawForIcon(textureatlassprite, i1) - 1;
                        ++j;

                        if (this.blockLayer != BlockRenderLayer.TRANSLUCENT)
                        {
                            this.drawnIcons[j1] = true;
                        }
                    }
                }
            }
        }

        if (k >= 0)
        {
            this.drawForIcon(TextureUtils.iconGrassSideOverlay, k);
            ++j;
        }

        if (j > 0)
        {
            ;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:59,代码来源:VertexBuffer.java

示例12: getBlockLayer

@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
    return this.blockMaterial == Material.WATER ? BlockRenderLayer.TRANSLUCENT : BlockRenderLayer.SOLID;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:BlockLiquid.java

示例13: getBlockLayer

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

示例14: getBlockLayer

@Override
public BlockRenderLayer getBlockLayer() {
    return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:Drazuam,项目名称:RunicArcana,代码行数:4,代码来源:BlockChalkBase.java

示例15: getBlockLayer

@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
	return BlockRenderLayer.TRANSLUCENT;
}
 
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:6,代码来源:BlockFancyLight.java


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