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