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


Java Blocks.GLASS屬性代碼示例

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


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

示例1: shouldSideBeRendered

public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
    Block block = iblockstate.getBlock();

    if (this == Blocks.GLASS || this == Blocks.STAINED_GLASS)
    {
        if (blockState != iblockstate)
        {
            return true;
        }

        if (block == this)
        {
            return false;
        }
    }

    return !this.ignoreSimilarity && block == this ? false : super.shouldSideBeRendered(blockState, blockAccess, pos, side);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:20,代碼來源:BlockBreakable.java

示例2: shouldSideBeRendered

@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
    Block block = iblockstate.getBlock();

    if (this == Blocks.GLASS || this == Blocks.STAINED_GLASS)
    {
        if (blockState != iblockstate)
        {
            return true;
        }

        if (block == this)
        {
            return false;
        }
    }

    return !this.ignoreSimilarity && block == this ? false : super.shouldSideBeRendered(blockState, blockAccess, pos, side);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:21,代碼來源:BlockBreakable.java

示例3: getGroundFromAbove

/**
 * Gets the Y-value of the ground at a specifix x/y coordinate.
 * @param world
 * @param x
 * @param z
 * @return
 */
public static int getGroundFromAbove(World world, int x, int z)
{
	int y = 255;
	boolean foundGround = false;
	while(!foundGround && y-- >= 63)
	{
		Block blockAt = world.getBlockState(new BlockPos(x,y,z)).getBlock();
		foundGround = blockAt == Blocks.DIRT || blockAt == Blocks.GRASS || blockAt == Blocks.SAND || blockAt == Blocks.SNOW || blockAt == Blocks.SNOW_LAYER || blockAt == Blocks.GLASS;
	}

	return y;
}
 
開發者ID:TheXFactor117,項目名稱:Loot-Slash-Conquer,代碼行數:19,代碼來源:LSCWorldGenerator.java

示例4: getPages

@Override
public List<NotebookPage> getPages(INotebookInfo info)
{
	List<NotebookPage> pages = new ArrayList<NotebookPage>();
	List<INotebookEntry> entries = new ArrayList<INotebookEntry>();
	entries.add(new NotebookEntryText(getUnlocalizedName() + "." + 0, 0x000000));
	ItemStack[][] itemsIn = { { ItemStack.EMPTY, new ItemStack(Items.ENDER_PEARL), ItemStack.EMPTY },
			{ new ItemStack(Blocks.PLANKS), new ItemStack(Blocks.GLASS), new ItemStack(Blocks.PLANKS) },
			{ new ItemStack(Blocks.PLANKS), ItemStack.EMPTY, new ItemStack(Blocks.PLANKS) } };
	entries.add(new NotebookEntryCraftingRecipe(itemsIn, new ItemStack(ModRegistry.ANALYZER)));
	entries.add(new NotebookEntryText(getUnlocalizedName() + "." + 1, 0x000000));
	pages.add(new NotebookPage(entries));
	return pages;
}
 
開發者ID:raphydaphy,項目名稱:ArcaneMagic,代碼行數:14,代碼來源:CategoryForgottenKnowledge.java

示例5: canPlaceOn

private boolean canPlaceOn(World worldIn, BlockPos pos)
{
    if (worldIn.getBlockState(pos).isFullyOpaque())
    {
        return true;
    }
    else
    {
        Block block = worldIn.getBlockState(pos).getBlock();
        return block instanceof BlockFence || block == Blocks.GLASS || block == Blocks.COBBLESTONE_WALL || block == Blocks.STAINED_GLASS;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:12,代碼來源:BlockTorch.java

示例6: canPaneConnectToBlock

public final boolean canPaneConnectToBlock(Block blockIn)
{
    return blockIn.getDefaultState().isFullCube() || blockIn == this || blockIn == Blocks.GLASS || blockIn == Blocks.STAINED_GLASS || blockIn == Blocks.STAINED_GLASS_PANE || blockIn instanceof BlockPane;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:4,代碼來源:BlockPane.java


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