本文整理匯總了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;
}