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