001    package net.minecraft.src;
002    
003    import cpw.mods.fml.common.Side;
004    import cpw.mods.fml.common.asm.SideOnly;
005    import java.util.Random;
006    
007    public class BlockMobSpawner extends BlockContainer
008    {
009        protected BlockMobSpawner(int par1, int par2)
010        {
011            super(par1, par2, Material.rock);
012        }
013    
014        /**
015         * Returns a new instance of a block's tile entity class. Called on placing the block.
016         */
017        public TileEntity createNewTileEntity(World par1World)
018        {
019            return new TileEntityMobSpawner();
020        }
021    
022        /**
023         * Returns the ID of the items to drop on destruction.
024         */
025        public int idDropped(int par1, Random par2Random, int par3)
026        {
027            return 0;
028        }
029    
030        /**
031         * Returns the quantity of items to drop on block destruction.
032         */
033        public int quantityDropped(Random par1Random)
034        {
035            return 0;
036        }
037    
038        /**
039         * Drops the block items with a specified chance of dropping the specified items
040         */
041        public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
042        {
043            super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, par7);
044            int var8 = 15 + par1World.rand.nextInt(15) + par1World.rand.nextInt(15);
045            this.dropXpOnBlockBreak(par1World, par2, par3, par4, var8);
046        }
047    
048        /**
049         * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
050         * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
051         */
052        public boolean isOpaqueCube()
053        {
054            return false;
055        }
056    
057        @SideOnly(Side.CLIENT)
058    
059        /**
060         * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
061         */
062        public int idPicked(World par1World, int par2, int par3, int par4)
063        {
064            return 0;
065        }
066    }