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


Java Block.getBlockLayer方法代碼示例

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


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

示例1: renderHand0

import net.minecraft.block.Block; //導入方法依賴的package包/類
public static void renderHand0(EntityRenderer er, float par1, int par2)
{
    if (!Shaders.isShadowPass)
    {
        Item item = Shaders.itemToRender != null ? Shaders.itemToRender.getItem() : null;
        Block block = item instanceof ItemBlock ? ((ItemBlock)item).getBlock() : null;

        if (!(item instanceof ItemBlock) || !(block instanceof Block) || block.getBlockLayer() == EnumWorldBlockLayer.SOLID)
        {
            Shaders.readCenterDepth();
            Shaders.beginHand();
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            er.renderHand(par1, par2);
            Shaders.endHand();
            Shaders.isHandRendered = true;
        }
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:ShadersRender.java

示例2: renderItemSide

import net.minecraft.block.Block; //導入方法依賴的package包/類
public void renderItemSide(EntityLivingBase entitylivingbaseIn, ItemStack heldStack, ItemCameraTransforms.TransformType transform, boolean leftHanded)
{
    if (!heldStack.func_190926_b())
    {
        Item item = heldStack.getItem();
        Block block = Block.getBlockFromItem(item);
        GlStateManager.pushMatrix();
        boolean flag = this.itemRenderer.shouldRenderItemIn3D(heldStack) && block.getBlockLayer() == BlockRenderLayer.TRANSLUCENT;

        if (flag && (!Config.isShaders() || !Shaders.renderItemKeepDepthMask))
        {
            GlStateManager.depthMask(false);
        }

        this.itemRenderer.renderItem(heldStack, entitylivingbaseIn, transform, leftHanded);

        if (flag)
        {
            GlStateManager.depthMask(true);
        }

        GlStateManager.popMatrix();
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:25,代碼來源:ItemRenderer.java

示例3: isTranslucentBlock

import net.minecraft.block.Block; //導入方法依賴的package包/類
private static boolean isTranslucentBlock(ItemStack stack)
{
    if (stack == null)
    {
        return false;
    }
    else
    {
        Item item = stack.getItem();

        if (item == null)
        {
            return false;
        }
        else if (!(item instanceof ItemBlock))
        {
            return false;
        }
        else
        {
            ItemBlock itemblock = (ItemBlock)item;
            Block block = itemblock.getBlock();

            if (block == null)
            {
                return false;
            }
            else
            {
                BlockRenderLayer blockrenderlayer = block.getBlockLayer();
                return blockrenderlayer == BlockRenderLayer.TRANSLUCENT;
            }
        }
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:36,代碼來源:Shaders.java

示例4: isBlockTranslucent

import net.minecraft.block.Block; //導入方法依賴的package包/類
/**
 * Returns true if given block is translucent
 */
private boolean isBlockTranslucent(Block blockIn)
{
    return blockIn != null && blockIn.getBlockLayer() == EnumWorldBlockLayer.TRANSLUCENT;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:8,代碼來源:ItemRenderer.java

示例5: isBlockTranslucent

import net.minecraft.block.Block; //導入方法依賴的package包/類
/**
 * Returns true if given block is translucent
 */
private boolean isBlockTranslucent(@Nullable Block blockIn)
{
    return blockIn != null && blockIn.getBlockLayer() == BlockRenderLayer.TRANSLUCENT;
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:8,代碼來源:ItemRenderer.java


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