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