Java Code Examples for net.minecraft.init.Blocks.tallgrass()

The following are Jave code examples for showing how to use tallgrass() of the net.minecraft.init.Blocks class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: DecompiledMinecraft   File: ItemShears.java   View Source Code Vote up 5 votes
/**
 * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic.
 */
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
{
    if (blockIn.getMaterial() != Material.leaves && blockIn != Blocks.web && blockIn != Blocks.tallgrass && blockIn != Blocks.vine && blockIn != Blocks.tripwire && blockIn != Blocks.wool)
    {
        return super.onBlockDestroyed(stack, worldIn, blockIn, pos, playerIn);
    }
    else
    {
        stack.damageItem(1, playerIn);
        return true;
    }
}
 
Example 2
Project: DecompiledMinecraft   File: ItemShears.java   View Source Code Vote up 5 votes
/**
 * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic.
 */
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
{
    if (blockIn.getMaterial() != Material.leaves && blockIn != Blocks.web && blockIn != Blocks.tallgrass && blockIn != Blocks.vine && blockIn != Blocks.tripwire && blockIn != Blocks.wool)
    {
        return super.onBlockDestroyed(stack, worldIn, blockIn, pos, playerIn);
    }
    else
    {
        stack.damageItem(1, playerIn);
        return true;
    }
}
 
Example 3
Project: BaseClient   File: ItemShears.java   View Source Code Vote up 5 votes
/**
 * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic.
 */
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
{
    if (blockIn.getMaterial() != Material.leaves && blockIn != Blocks.web && blockIn != Blocks.tallgrass && blockIn != Blocks.vine && blockIn != Blocks.tripwire && blockIn != Blocks.wool)
    {
        return super.onBlockDestroyed(stack, worldIn, blockIn, pos, playerIn);
    }
    else
    {
        stack.damageItem(1, playerIn);
        return true;
    }
}
 
Example 4
Project: BaseClient   File: ItemShears.java   View Source Code Vote up 5 votes
/**
 * Called when a Block is destroyed using this Item. Return true to trigger the "Use Item" statistic.
 */
public boolean onBlockDestroyed(ItemStack stack, World worldIn, Block blockIn, BlockPos pos, EntityLivingBase playerIn)
{
    if (blockIn.getMaterial() != Material.leaves && blockIn != Blocks.web && blockIn != Blocks.tallgrass && blockIn != Blocks.vine && blockIn != Blocks.tripwire && blockIn != Blocks.wool)
    {
        return super.onBlockDestroyed(stack, worldIn, blockIn, pos, playerIn);
    }
    else
    {
        stack.damageItem(1, playerIn);
        return true;
    }
}
 
Example 5
Project: DecompiledMinecraft   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
private boolean canNotContain(Block blockIn, int meta)
{
    return blockIn != Blocks.yellow_flower && blockIn != Blocks.red_flower && blockIn != Blocks.cactus && blockIn != Blocks.brown_mushroom && blockIn != Blocks.red_mushroom && blockIn != Blocks.sapling && blockIn != Blocks.deadbush ? blockIn == Blocks.tallgrass && meta == BlockTallGrass.EnumType.FERN.getMeta() : true;
}
 
Example 6
Project: DecompiledMinecraft   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    Block block = null;
    int i = 0;

    switch (meta)
    {
        case 1:
            block = Blocks.red_flower;
            i = BlockFlower.EnumFlowerType.POPPY.getMeta();
            break;

        case 2:
            block = Blocks.yellow_flower;
            break;

        case 3:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.OAK.getMetadata();
            break;

        case 4:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.SPRUCE.getMetadata();
            break;

        case 5:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.BIRCH.getMetadata();
            break;

        case 6:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.JUNGLE.getMetadata();
            break;

        case 7:
            block = Blocks.red_mushroom;
            break;

        case 8:
            block = Blocks.brown_mushroom;
            break;

        case 9:
            block = Blocks.cactus;
            break;

        case 10:
            block = Blocks.deadbush;
            break;

        case 11:
            block = Blocks.tallgrass;
            i = BlockTallGrass.EnumType.FERN.getMeta();
            break;

        case 12:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.ACACIA.getMetadata();
            break;

        case 13:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.DARK_OAK.getMetadata();
    }

    return new TileEntityFlowerPot(Item.getItemFromBlock(block), i);
}
 
Example 7
Project: DecompiledMinecraft   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
private boolean canNotContain(Block blockIn, int meta)
{
    return blockIn != Blocks.yellow_flower && blockIn != Blocks.red_flower && blockIn != Blocks.cactus && blockIn != Blocks.brown_mushroom && blockIn != Blocks.red_mushroom && blockIn != Blocks.sapling && blockIn != Blocks.deadbush ? blockIn == Blocks.tallgrass && meta == BlockTallGrass.EnumType.FERN.getMeta() : true;
}
 
Example 8
Project: DecompiledMinecraft   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    Block block = null;
    int i = 0;

    switch (meta)
    {
        case 1:
            block = Blocks.red_flower;
            i = BlockFlower.EnumFlowerType.POPPY.getMeta();
            break;

        case 2:
            block = Blocks.yellow_flower;
            break;

        case 3:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.OAK.getMetadata();
            break;

        case 4:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.SPRUCE.getMetadata();
            break;

        case 5:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.BIRCH.getMetadata();
            break;

        case 6:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.JUNGLE.getMetadata();
            break;

        case 7:
            block = Blocks.red_mushroom;
            break;

        case 8:
            block = Blocks.brown_mushroom;
            break;

        case 9:
            block = Blocks.cactus;
            break;

        case 10:
            block = Blocks.deadbush;
            break;

        case 11:
            block = Blocks.tallgrass;
            i = BlockTallGrass.EnumType.FERN.getMeta();
            break;

        case 12:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.ACACIA.getMetadata();
            break;

        case 13:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.DARK_OAK.getMetadata();
    }

    return new TileEntityFlowerPot(Item.getItemFromBlock(block), i);
}
 
Example 9
Project: BaseClient   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
private boolean canNotContain(Block blockIn, int meta)
{
    return blockIn != Blocks.yellow_flower && blockIn != Blocks.red_flower && blockIn != Blocks.cactus && blockIn != Blocks.brown_mushroom && blockIn != Blocks.red_mushroom && blockIn != Blocks.sapling && blockIn != Blocks.deadbush ? blockIn == Blocks.tallgrass && meta == BlockTallGrass.EnumType.FERN.getMeta() : true;
}
 
Example 10
Project: BaseClient   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    Block block = null;
    int i = 0;

    switch (meta)
    {
        case 1:
            block = Blocks.red_flower;
            i = BlockFlower.EnumFlowerType.POPPY.getMeta();
            break;

        case 2:
            block = Blocks.yellow_flower;
            break;

        case 3:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.OAK.getMetadata();
            break;

        case 4:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.SPRUCE.getMetadata();
            break;

        case 5:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.BIRCH.getMetadata();
            break;

        case 6:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.JUNGLE.getMetadata();
            break;

        case 7:
            block = Blocks.red_mushroom;
            break;

        case 8:
            block = Blocks.brown_mushroom;
            break;

        case 9:
            block = Blocks.cactus;
            break;

        case 10:
            block = Blocks.deadbush;
            break;

        case 11:
            block = Blocks.tallgrass;
            i = BlockTallGrass.EnumType.FERN.getMeta();
            break;

        case 12:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.ACACIA.getMetadata();
            break;

        case 13:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.DARK_OAK.getMetadata();
    }

    return new TileEntityFlowerPot(Item.getItemFromBlock(block), i);
}
 
Example 11
Project: BaseClient   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
private boolean canNotContain(Block blockIn, int meta)
{
    return blockIn != Blocks.yellow_flower && blockIn != Blocks.red_flower && blockIn != Blocks.cactus && blockIn != Blocks.brown_mushroom && blockIn != Blocks.red_mushroom && blockIn != Blocks.sapling && blockIn != Blocks.deadbush ? blockIn == Blocks.tallgrass && meta == BlockTallGrass.EnumType.FERN.getMeta() : true;
}
 
Example 12
Project: BaseClient   File: BlockFlowerPot.java   View Source Code Vote up 4 votes
/**
 * Returns a new instance of a block's tile entity class. Called on placing the block.
 */
public TileEntity createNewTileEntity(World worldIn, int meta)
{
    Block block = null;
    int i = 0;

    switch (meta)
    {
        case 1:
            block = Blocks.red_flower;
            i = BlockFlower.EnumFlowerType.POPPY.getMeta();
            break;

        case 2:
            block = Blocks.yellow_flower;
            break;

        case 3:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.OAK.getMetadata();
            break;

        case 4:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.SPRUCE.getMetadata();
            break;

        case 5:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.BIRCH.getMetadata();
            break;

        case 6:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.JUNGLE.getMetadata();
            break;

        case 7:
            block = Blocks.red_mushroom;
            break;

        case 8:
            block = Blocks.brown_mushroom;
            break;

        case 9:
            block = Blocks.cactus;
            break;

        case 10:
            block = Blocks.deadbush;
            break;

        case 11:
            block = Blocks.tallgrass;
            i = BlockTallGrass.EnumType.FERN.getMeta();
            break;

        case 12:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.ACACIA.getMetadata();
            break;

        case 13:
            block = Blocks.sapling;
            i = BlockPlanks.EnumType.DARK_OAK.getMetadata();
    }

    return new TileEntityFlowerPot(Item.getItemFromBlock(block), i);
}