本文整理汇总了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;
}
}
}
示例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();
}
}
示例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;
}
}
}
}
示例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;
}
示例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;
}