當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。