001    package net.minecraft.src;
002    
003    import java.util.Random;
004    
005    public class BlockWeb extends Block
006    {
007        public BlockWeb(int par1, int par2)
008        {
009            super(par1, par2, Material.web);
010            this.setCreativeTab(CreativeTabs.tabDeco);
011        }
012    
013        /**
014         * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
015         */
016        public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
017        {
018            par5Entity.setInWeb();
019        }
020    
021        /**
022         * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
023         * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
024         */
025        public boolean isOpaqueCube()
026        {
027            return false;
028        }
029    
030        /**
031         * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
032         * cleared to be reused)
033         */
034        public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
035        {
036            return null;
037        }
038    
039        /**
040         * The type of render function that is called for this block
041         */
042        public int getRenderType()
043        {
044            return 1;
045        }
046    
047        /**
048         * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
049         */
050        public boolean renderAsNormalBlock()
051        {
052            return false;
053        }
054    
055        /**
056         * Returns the ID of the items to drop on destruction.
057         */
058        public int idDropped(int par1, Random par2Random, int par3)
059        {
060            return Item.silk.shiftedIndex;
061        }
062    }