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